In my table I have a field set to Date/Time format.
In my form I have a text box for the user to input data. I need to either
a) allow any format of date to be entered, ie 2nd Jan 09 or 2/1/9 or January
2nd 2009 et cetera
b) a dialogue box appearing to tell the user to enter the date in the
correct format: dd/mm/yyyy
Any ideas?
a) is the default. Access is very forgiving about date entry; there are some
limitations - all of the examples you post work "out of the box" (assuming
that your computer's regional settings are set to d/m/y dates).
Literal dates used as search criteria must be in m/d/y format or an
unambiguous format such as yyyy-mm-dd however. You can use the Format()
function to recast a user entered date into an allowed format, i.e. use a
criterion on a date field of
=Format([Forms]![frmCrit]![txtFindDate], "mm/dd/yyyy")
The user can enter 4/3 into the textbox txtFindDate (with their computer's
Start... Control Panel... Regional and Language... Date/Time set to
dd/mm/yyyy) and the search will translate it to 03/04/2009.
They can also enter a date (using any of these styles) into a table field
(using a form, or even using a table datasheet); if the date field is
displayed in a textbox with a dd/mm/yyyy format, that's what will be shown.
What specific problem are you having?