DEFAULT Value in a Query PROMPT (Criteria-type) ??

  • Thread starter Thread starter kev100 via AccessMonster.com
  • Start date Start date
K

kev100 via AccessMonster.com

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.
 
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
 
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())
 
Nz( [Enter Date (press Enter for today)], Date())

Thanks very much...that seems to work great.
 
Back
Top