Input Masks

R

.:RoKsTaR:.

Hi There,

I see that Access has some pre made masks to cover some of the things I
need, but I'm wondering how to do something else.

How can I make sure that the date gets entered mm dd yyyy and not dd mm yyyy?
Also, can I have mm dd yyyy displayed as the place markers?

Cheers!
 
J

Jeff Boyce

Ask I recall, the sequence required depends on the Regional Settings you set
in Windows, not in Access.

I tend not to use input masks, mainly because they are 'finicky' -- the user
MUST enter exactly what is masked, and in the correct locations. It tends
to take a degree of precision that my big fat fingers can't mouse to ...

On the other hand, if you require a date value in the field, but don't use
an input mask, YOU can set the format that is actually displayed, regardless
of how it is entered.

Are you aware that Access stores date/time values one way, but lets you
decide how to DISPLAY them?


Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
J

John W. Vinson

Hi There,

I see that Access has some pre made masks to cover some of the things I
need, but I'm wondering how to do something else.

How can I make sure that the date gets entered mm dd yyyy and not dd mm yyyy?
Also, can I have mm dd yyyy displayed as the place markers?

Cheers!

An input mask is simply not capable of doing what you want. The *only* thing
it can do is control what valid keystrokes can be entered. 05/11/2010 and
11/05/2010 are both valid dates, and both will be accepted by an input mask of
00/00/0000; there is no option on a mask of saying "this zero needs to be part
of a month, and this other zero is part of a year" - to the mask engine, it's
just keystrokes!

The only way I can think of to ensure valid dates is to use a date picker
tool. Second best would be to use a dd-mmm-yyyy format (27-May-2010), with an
input mask 00-AAA-0000, forcing entry of the three letter month name
abbreviation.
 

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