Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data format problem in MS Access Form text boxes

Status
Not open for further replies.

JamieNC

MIS
Jun 12, 2002
22
GB
Currently I have a number of text boxes in my MS Access forms that are formatted to and have the input mask 'short date' (reads as dd/mm/yy - UK date format in regional variations on Windows).

Whenever I enter a date into one of these text boxes, Access alters the date as soon as the focus leaves the text box, switching the values entered in the day and year parts of the date (e.g. a date I enter as 31/07/02 will change into 02/07/31 when focus leaves the text box). Infuriating!

Does anybody out there have any idea how to stop this from happening?
 
What date format is the default on your PC in the control panel? Sounds like you're entering European dates and the PC might be defaulting to US dates.

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Tried that. Date format on control panel is UK. In any case UK defaulting to US would be dd/mm/yy to mm/dd/yy, whereas the problem I'm having changes dd/mm/yy to yy/mm/dd.

Any other suggestions?
 
Unless your table or form has a manually created INPUT MASK associated with it that does this re-formatting for you, by selecting the desired FORMAT in the table's field property box I don't believe this should happen.

Check for input masks. Otherwise, I can't think of anything. Sorry.

Jim "Get it right the first time, that's the main thing..." [wavey]
 
Have managed to solve the problem. Removed the short date input mask that was on the text box and saved the database. Then after closing and reopening the db I reapplied the same input mask. Now the dates are not amended by Access and remain the way they should be.

This is rather strange as I tried the same solution yesterday to no avail, so I guess the Microsoft pixies must have visited my laptop overnight!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top