Query using a date criteria

E

Eric Starn

I have a query that I have set the criteria by a date field - ">=#12/1/2009#"
What I would like to do is have the query run with the same operators but
with a date that has been input by the user.
I am not sure how to write it for that use.

Thanks

Eric
 
J

John W. Vinson

I have a query that I have set the criteria by a date field - ">=#12/1/2009#"
What I would like to do is have the query run with the same operators but
with a date that has been input by the user.
I am not sure how to write it for that use.

Thanks

Eric

I'd suggest just
= [Enter start date:]

If you do so it's a good idea - and sometimes necessary - to use the query's
Parameters collection. To do so open the query in design view, rightclick the
grey background of the tables, and select Parameters from the dropdown. Put

[Enter start date:]

in the left column - it must match your parameter exactly - and select
Date/Time in the right. Doing so makes the # delimiters unnecessary.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top