Parameter Query

R

Roger Bell

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
 
B

BruceM

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.
 
R

Roger Bell

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
 
J

John Spencer

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
 
K

Keith Wilby

Roger Bell 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

I think the closest you'll get is to devise a form to enter your criteria,
then you could have an input mask on the text boxes.

Keith.
www.keithwilby.co.uk
 
B

BruceM

What format are you talking about? The format of the parameter prompt? The
format of DateOfFinish in the query? I'm not saying anything is possible or
not, but only that I do not understand the question.

Roger Bell 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
 

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