the Manx Man's MS Access Pages

Formatting Text Boxes with Dates in them (010)

Here is my favourite way of formatting a text box with a date in it.

Create the text box and in its format property put:

          mmm d, yyyy

Now, whenever a user puts a date in that text box, whether they have to use mm/dd/yy or mm/dd/yyyy or dd/mm/yy or dd/mm/yyyy or ... when they exit the text box the date will be shown like this example - Jan 24, 2000.

This is terrific visual feedback, especially for people who have computers that cannot make up their mind about the mm/dd or dd/mm thing. (I have a client with a machine that flip flops)

As an added bonus, tell your users that they can enter dates in this way - jan 24 2000. No upper case needed, no comma needed. Access figures it out! In fact, just put jan 24 and the machine should assume the current year.

p.s.   Forget the input box. They can be a pain. Just teach your users or put a little helpful label that explains how to enter dates.

For a version of this tip that applies to reports, click here.

e-mail the manx man index of tips click here for a laugh profit from the web

tip # 010  ||  previous tip  ||  next tip