How to enter dates as mmddyy

T

Tony Girgenti

Hello.

I have a form set up to accept a start and end date. I run a query based on
the dates using "DoCmd.OpenReport stDocName, acViewPreview, , strWhere"

and a strWhere that looks like this:
"[COMPANY NAME] = "A V H INTERIORS 4061" AND TempStatus.JOBNO In (SELECT
JOBNO FROM TempStatus WHERE WORKSTATION= "#2- RECEIVED" AND
[TempStatus].TIMESTAMP <= "#01/01/2005#")"

The form date fields have a format of General Date.

When you enter a date, you have to put in the slashes and a full year like
this: 01/14/2006.

How can i set up the form date fields to allow input of a date as "mmddyy" ?
In other words, enter the date without slashes and a full year.

Any help would be greatly appreciated.

Thanks,
Tony
 
J

John Vinson

When you enter a date, you have to put in the slashes and a full year like
this: 01/14/2006.

How can i set up the form date fields to allow input of a date as "mmddyy" ?
In other words, enter the date without slashes and a full year.

This is one of the few cases where an Input Mask is useful. Try a mask
of 00/00/00. You should be able to type six digits; Access will fill
in the slashes for you, and it will recognize 01/14/06 as 2006.

John W. Vinson[MVP]
 
T

Tony Girgenti

Thanks John. That worked out great.

John Vinson said:
This is one of the few cases where an Input Mask is useful. Try a mask
of 00/00/00. You should be able to type six digits; Access will fill
in the slashes for you, and it will recognize 01/14/06 as 2006.

John W. Vinson[MVP]
 

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