Inserting Date in table

G

Gordon

Hi
I have a small database which is populated with the help of a form. All the text boxes in the form are unbound. All of the fields except the one that contains the data can be updated without any problem. The problem with the date field is that if the user inputs 01/05/2004 in the field, the value 05/01/2004 is inserted in the table (basically the day and the month are switched). I have made sure that the date format on the pc is set as dd/mm/yyyy and that the field in Access is set as a Date/Time with the format as Short Date. Is there some other setting that I might have overlooked

Thanks and Regard
Gordon
 
A

Allen Browne

Try setting the Format property of the unbound text box to Short Date.

For more suggestions on ensuring Access does not misunderstand your
dd/mm/yyyy format, see:
International Date Formats in Access
at:
http://allenbrowne.com/ser-36.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Gordon said:
I have a small database which is populated with the help of a form. All
the text boxes in the form are unbound. All of the fields except the one
that contains the data can be updated without any problem. The problem with
the date field is that if the user inputs 01/05/2004 in the field, the value
05/01/2004 is inserted in the table (basically the day and the month are
switched). I have made sure that the date format on the pc is set as
dd/mm/yyyy and that the field in Access is set as a Date/Time with the
format as Short Date. Is there some other setting that I might have
overlooked?
 
G

Gordon

Hi Allen

First I tried to set the text box format as short date but this didn't solve the problem. I went into your web site and saw that I have to set the date in the american format (mm/dd/yyyy) before submitting it to the database. I have changed the code and the database is working fine now

Thanks a lot for your help

Regard
Gordon
 

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