Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

input masks

Status
Not open for further replies.

mgbeye

Programmer
May 30, 2001
47
US
My query prompts for the date, but I want it entered in a certain form. I can't get my input masks to work properly though. Whats the trick?? Can anyone tell me how to do this?

Thanks,
Melissa :)
 
Have you created a form with a textbox where the query can get the value? Have you refered the query to that textbox?
Example:

SELECT Field1 FROM Table1 WHERE DateField LIKE Forms!Form1!txtDate;

How do you want the mask to be formated? Here is a example for the format 2001-06-04. 0000-00-00;0;_
 
The query is attached to a report. I have not set up a form however it brings up a box that says "Enter start date:" or "Enter ending date:". Is there a way to set a mask in that type of box or do I have to create a form? I would like the format to be simple. mm/dd/yy most likely.

Thanks! :)
 
The query is attached to a report. I have not set up a form however it brings up a box that says "Enter start date:" or "Enter ending date:". Is there a way to set a mask in that type of box or do I have to create a form? I would like the format to be simple. mm/dd/yy most likely.

Thanks! >:):O>
 
You have to create a form because you can't access the default boxes that asks for the dates. Create a form with two textboxes and a button that opens the report. Refere to the two textboxes in the query that is attached to the report.

Example:

SELECT Field1 FROM Table1 WHERE DateField >= Forms!Form1!txtStartDate AND DateField <= Forms!Form1!txtEndingDate;

If you use the format &quot;Short date&quot; you can use the InputMask &quot;00/00/00;0;_&quot; for dd/mm/yy. But I dont like Access inputmasks. If you enter over 12 in the first places that is the month, but if you enter over 12 in the other places that is the month??? If both is 12 or under the second place is the month. Maby someone else know this better?
 
No you can't use the popup box and supply an input mask. You can SUGGEST an input mask by putting in things like:

[Enter Start Date in MM/YY/DD format]

but the user can still type anything they want. You'll have to make a form to supply your criteria and use the input mask on those controls to limit your users.

HTH Joe Miller
joe.miller@flotech.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top