I have the following:
It all works apart from the totalstartdate bit.
when it inserts into the database the totalstartdate shows as (example) 12/05/2009 and the totalenddate show as (example) 20/05/2009.
then when you look in the database it shows as 05/12/2009 and 20/05/2009.
Is there a reason why access is swapping the date format around for totalstartdate sometimes? and not the totalenddate? Is there a way to solve it?
This is driving me nuts.
Thanks
Swarv
Code:
SQLText = "INSERT INTO absent ([start_date], [end_date], [days], [reason], [name], [fullname], [day], [absentcode], [notes], [comments], [backtowork], [certification]) SELECT #" & totalstartdate & "#, #" & totalenddate & "#, " & TotalBusinessDays & ", '" & namevalue2 & "', '" & namevalue & "', '" & fullname2 & "', '" & inputday & "', '" & recordit & "', '" & notesbox & "', '" & commentsbox & "', '" & backtoyes & "', '" & certtoyes & "'"
DoCmd.RunSQL SQLText
It all works apart from the totalstartdate bit.
when it inserts into the database the totalstartdate shows as (example) 12/05/2009 and the totalenddate show as (example) 20/05/2009.
then when you look in the database it shows as 05/12/2009 and 20/05/2009.
Is there a reason why access is swapping the date format around for totalstartdate sometimes? and not the totalenddate? Is there a way to solve it?
This is driving me nuts.
Thanks
Swarv