Hi
The code below works well apart from DatePosted = 12/09/02 and when it inserts this date into the table it reads 09/12/02.
Public Function addDate()
Dim conDatabase As ADODB.Connection
Dim strSQL As String
Dim SumOfValue As Currency
Set conDatabase = CurrentProject.Connection
strSQL = "INSERT INTO tblDateRun (DateRun) VALUES (# " & DatePosted & " #);"
conDatabase.Execute strSQL
conDatabase.Close
Set conDatabase = Nothing
I have my regional settings set to UK - English and the date format in my table is dd-mm-yy.
Any help appreciated.
The code below works well apart from DatePosted = 12/09/02 and when it inserts this date into the table it reads 09/12/02.
Public Function addDate()
Dim conDatabase As ADODB.Connection
Dim strSQL As String
Dim SumOfValue As Currency
Set conDatabase = CurrentProject.Connection
strSQL = "INSERT INTO tblDateRun (DateRun) VALUES (# " & DatePosted & " #);"
conDatabase.Execute strSQL
conDatabase.Close
Set conDatabase = Nothing
I have my regional settings set to UK - English and the date format in my table is dd-mm-yy.
Any help appreciated.