I've got a query which uses [Enter Date:] in the criteria to prompt the user
for the date.
The date they enter will Usually be the Current date...but not always.
Is there anything that can be added to the prompt that will automatically
insert/enter the current date....displaying it with the prompt...but allowing
the user to enter a different date, when needed?
Something like:
Enter Date: 07/06/2006
- or maybe -
Enter Date (press Enter for today):
Thanks very much.
Allen Browne - 06 Jul 2006 16:45 GMT
Haven't actually tried this, but in the Criteria of your query, try
replacing:
[Enter Date]
with:
Nz([Enter Date], Date())
Be sure to declare the parameter so Access understands it correctly.
In query design view, choose Parameters on the Query menu.
In the dialog, enter:
[Enter Date] Date

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> I've got a query which uses [Enter Date:] in the criteria to prompt the
> user
[quoted text clipped - 16 lines]
>
> Thanks very much.
Duane Hookom - 06 Jul 2006 16:52 GMT
I much prefer and recommend using a control on a form for this since you can
set defaults etc. However, try
Nz( [Enter Date (press Enter for today)], Date())

Signature
Duane Hookom
MS Access MVP
> I've got a query which uses [Enter Date:] in the criteria to prompt the
> user
[quoted text clipped - 16 lines]
>
> Thanks very much.
kev100 - 06 Jul 2006 23:49 GMT
> Nz( [Enter Date (press Enter for today)], Date())
Thanks very much...that seems to work great.