You are correct. If you use a parameter prompt, you cannot specify format or
anything else.
The way to handle this is to use a control on a form and reference the control
in the criteria. That is replace
[Enter Date (mm/dd/yy)]
with
Forms![Name of your Form]![Name of the control on the form]
Here are some articles on how to do this. You don't have to use a combo-box
as the control, you can use a simple text box.
Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm
Or check out this from MS
http://office.microsoft.com/en-us/access/HA011730581033.aspx
Or for another example
http://allenbrowne.com/ser-62.html
A brief quote from a John Vinson (Access MVP) posting.
You'll need to create a small unbound Form (let's call it frmCriteria) with a
Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.
Now use
=[Forms]![frmCriteria]![cboCrit]
as the criterion in your Query.
It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form or
report, the user can enter the criterion and view the results in one simple
operation!
End quote
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
Roger said:
Thanks for your help, Bruce. What I am wanting is for the the format to
appear eg:
space/space/
I guess it cannot be achieved in a parameter query
Thanks again to anyone
BruceM said:
The way you show it in the parameter prompt does not affect how the date is
entered. In Access 2003 I can do:
[Enter Date (mm/dd/yy)]
I suggest specifying the order using dd and mm rather than numbers, as some
people are accustomed to putting the day first, and will not know what is
intended by 01/01. For that matter, I don't know either. Maybe the first
01 *is* the day.
All of this assumes DateOfFinish is a Date/Time field, which it should be.
Roger Bell said:
I have a parameter query that asks the user to enter a date, so that a
certificate can be printed.
The field is call "Date of finish" and the criteria is:
[ENTER DATE OF FINISH EG: 01 01 09]
Is there any way the Parameter query can be formatted as a date field with
the forward slash / to seperate the day, Month & Year, instead of having
to
hit the space bar between day, month & year.
Thanks for any help