throw some single quotes around the office IDs
AND tblReferrals.strRefOfficeIDFK BETWEEN '#StartSort#' AND '#EndSort#'
--b
--------------------------------------------------------
Bryan Batchelder Home: 727.547.1322
Web Application Developer Work: 813.935.7100 x427
Cell: 727.460.6665
--------------------------------------------------------
Company: www.connectwise.com
Personal: pontiphex.stetsonsucks.com
Personal Key: pontiphex.stetsonsucks.com/pgp.txt
Work Key: pontiphex.stetsonsucks.com/bbatchelder.asc
--------------------------------------------------------
At the macro level, it may appear that I am doing
nothing. But at the cellular level I am really
quite busy.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 09, 2001 3:55 PM
> To: CF-Talk
> Subject: Searching Multiple Data Ranges
>
>
> 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