>question why is the query not showing an 12-12-2003 on dob highted in red

Your original code was

<!--- If we want all people younger than an age --->
  <cfif Form.YoungerThan AND NOT Form.OlderThan>
   AND dob < DateAdd(Year,#Form.YoungerThan#,dob)
  </cfif>

<!--- If we want all people older than an age --->
  <cfif NOT Form.YoungerThan AND Form.OlderThan>
   AND dob > DateAdd(Year,#Form.OlderThan#,dob)
  </cfif>

This DateAdd function is being run in Access not CF. I am guessing its
something like this DateAdd(Date part,first date, second date).

Your first date is the coldfusion variable thats coming in from cf and the
second date is the dob field in the database.

You may want to prefix these fields with the table name to prevent
confusion. EG.
<!--- If we want all people younger than an age --->
  <cfif Form.YoungerThan AND NOT Form.OlderThan>
   AND Talent.dob < DateAdd(Year,#Form.YoungerThan#,Talent.dob)
  </cfif>

<!--- If we want all people older than an age --->
  <cfif NOT Form.YoungerThan AND Form.OlderThan>
   AND Talent.dob > DateAdd(Year,#Form.OlderThan#,Talent.dob)
  </cfif>


Can you try copying your query to just above your cfquery tags and surround
it with <cfoutput> and <pre> tags. This will output exatly what is being run
on the database. If you post the output of this it may be easier to debug.

Cheers

Mark


______________
Mark Stanton
Web Production
Gruden Pty Ltd
Tel: 9956 6388
Mob: 0410 458 201
Fax: 9956 8433
www.gruden.com



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to