Hello,
I am looking for some assistance on searching for data ranges.
On my search form I have the following two ranges to search on:
<INPUT TYPE="Text" NAME="Datethen" VALUE="#dateFormat(Now()-7)#"> TO <INPUT
TYPE="Text" NAME="Datenow" VALUE="#dateFormat(Now())#">
<INPUT TYPE="Text" NAME="OfficeIDA"> TO <INPUT TYPE="Text" NAME="OfficeIDB">
When I submit the form I am looking for records with a specific date range and office
id range.
I reassign the OfficeID values on the action page:
<CFSET StartSort=form.OfficeID1>
<CFSET EndSort=form.OfficeID2>
and then use the following query:
WHERE tblReferrals.dteRefDate BETWEEN #createodbcdate(form.Datethen)#
AND #createodbcdate(form.Datenow)# AND tblReferrals.strRefOfficeIDFK BETWEEN
#StartSort# AND #EndSort#
The Date range search works but I am having difficulties with the Start and End
variables. When I enter values into the OfficeID fields and receive an odbc error
"Invalid column name".
Any help would be greatly appreciated.
Thanks.
John
Visit www.cfworkshop.com
Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists