G
Guest
I found the following code in a previous post and I am trying to use this:
however, the DATE() in the Values portion of the statement does not
work. Access 97 kicks out the brackets following DATE, therefor the date
inserted is incorrect.
Any ideas how one might correct the date?
Would there be a correct solution such as:
Dim InsertDate as string
InsertDate = DATE()
Cheers
Private Sub MyProcedureName
Dim sSQL as string
sSQL = "INSERT INTO Dispositions([Date], [EventID], [Disposition]) " & _
"VALUES (" & DATE() & ", " & Me.EventID & ", 'Opened');"
CurrentDb.Execute sSQL
End Sub
however, the DATE() in the Values portion of the statement does not
work. Access 97 kicks out the brackets following DATE, therefor the date
inserted is incorrect.
Any ideas how one might correct the date?
Would there be a correct solution such as:
Dim InsertDate as string
InsertDate = DATE()
Cheers