-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use Form reference parameters in the query:
PARAMETERS Forms!FormName!ControlName Date;
SELECT...
FROM ...
WHERE [Date Ordered] >= Forms!FormName!ControlName
For absolute dates (sometimes called hard-coded dates) use the #
delimiter:
[Date Ordered] >= #1/1/98# And [Date Ordered] <= #2/1/98#
The above can be better written as:
[Date Ordered] BETWEEN #1/1/98# And #2/1/98#
To use the # delimiter the date has to be in USA date format:
month/day/year.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBREfvFIechKqOuFEgEQK/IgCgxZMvRbvICEiEkW7d2AHae5FhjWgAoLoi
ZpBWBs+DrAWgETtkiX1BdZBM
=x5e6
-----END PGP SIGNATURE-----
vu********@gmail.com wrote:
I have a listbox on a form that is selecting using named FinalQuery:
SELECT [FinalQuery].[Job No#], [FinalQuery].[Date Ordered],
[FinalQuery].[Misc#]
FROM FinalQuery;
Now I have a text field with a date on this form and I'd like to use
that date as the selection criteria, comparing to the [Date Ordered]...
how would I use a field with the WHERE clause?
WHERE [FinalQuery].[Date Ordered] >= ....
also when I use static dates in the WHERE:
WHERE ((([FinalQuery].[Date Ordered])>="01/01/98" And
([FinalQuery].[Date Ordered])<="02/01/98"));
I get Data type mismatch in criteria expression...