By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,498 Members | 835 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,498 IT Pros & Developers. It's quick & easy.

Data entry format

P: n/a
Is there any way that I can enforce an input mask when I am asking a user to
input criteria? An example would be:

SELECT Peeps.[First Name], Peeps.Surname, Peeps.DOB
FROM Peeps
WHERE (((Peeps.DOB) Like [Enter Month]));

I would like the box to come up with something like "Enter month __/__/__"
so that all they enter are numeric values only and no slashes. Any help
would be greatly appreciated.

Mark
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Mark Reed" wrote
Is there any way that I can enforce an
input mask when I am asking a user to
input criteria? An example would be:

SELECT Peeps.[First Name], Peeps.Surname, Peeps.DOB
FROM Peeps
WHERE (((Peeps.DOB) Like [Enter Month]));


Create a Form on which you provide Controls into which the user enters, or
from which the user selects the criteria. Then use what is entered to create
the WhereCondition argument of DoCmd.OpenForm or DoCmd.OpenReport; or use
what is entered to build an SQL string that you pick up and substitute for
the RecordSource in the Open event of the Form or Report.

You can't do what you want by creating a Parameter query, as you have done.

Larry Linson
Microsoft Access MVP

Nov 12 '05 #2

P: n/a
On Sat, 24 Jan 2004 00:47:15 -0000 in comp.databases.ms-access, "Mark
Reed" <ma*********@ntlworld.com> wrote:
Is there any way that I can enforce an input mask when I am asking a user to
input criteria? An example would be:

SELECT Peeps.[First Name], Peeps.Surname, Peeps.DOB
FROM Peeps
WHERE (((Peeps.DOB) Like [Enter Month]));

I would like the box to come up with something like "Enter month __/__/__"
so that all they enter are numeric values only and no slashes. Any help
would be greatly appreciated.


Create a popup form with a textbox with required input mask, then the
query can look something like:

select .... where dob like forms!MyPopupForm!MyTextBox

May need playing with a bit, the resulting reference to an input
masked textbox may not be quite what you expect.

--
A)bort, R)etry, I)nfluence with large hammer.
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.