R
Rose B
I am inserting a record into a table via VBA using the date field of a record
on a form. The insert works fine EXCEPT that instead of entering the date
into the table inn the format of dd/mm/yyyy it puts it in as mm/dd/yyyy. My
SQL INSERT statement is ......
"INSERT into RepeatJob ([LastTrip], Client, Destination, Frequency) values
(" & Format(Me.Date_of_Trip, "\#dd\/mm\/yyyy\#") & "," ...etc
The dates are defined as Short Date. I have displyed the values of
Me.Date_of_Trip and also of my SQL statement via MsgBox and they show the
date correctly in dd/mm/yyyy, but when I look at the record in the new table
it has inserted it incorrectly.....UNLESS the value of "dd" is higher than
"12" - in which case it inserts it correctly!
Can anyone help?
on a form. The insert works fine EXCEPT that instead of entering the date
into the table inn the format of dd/mm/yyyy it puts it in as mm/dd/yyyy. My
SQL INSERT statement is ......
"INSERT into RepeatJob ([LastTrip], Client, Destination, Frequency) values
(" & Format(Me.Date_of_Trip, "\#dd\/mm\/yyyy\#") & "," ...etc
The dates are defined as Short Date. I have displyed the values of
Me.Date_of_Trip and also of my SQL statement via MsgBox and they show the
date correctly in dd/mm/yyyy, but when I look at the record in the new table
it has inserted it incorrectly.....UNLESS the value of "dd" is higher than
"12" - in which case it inserts it correctly!
Can anyone help?