I am receiving the following error when I run the function below:
Syntax error in INSERT INTO statement.
This is the call to the function:
modUtilities.LoggingActivity "Successfully logged in"
The function defined:
Public Sub LoggingActivity(Activity As String)
Dim strSQL As String
strSQL = "INSERT INTO Logs (UserId, Date, Operation) Values ('" & gstrThisUser & "','" & Now() & "','" & Activity & "')"
CurrentDb.Execute "INSERT INTO Logs (UserId, Date, Operation) Values ('" & gstrThisEmpName & "','" & Now() & "','" & Activity & "')"
End Sub
Contents of strSQL:
INSERT INTO Logs (UserId, Date, Operation) Values ('admin','10/6/2017 3:22:31 PM','Successfully logged in')
And for the life of me that looks like it should work....
Any ideas?
Thank you,
Art Lorenzini
SD
Posted by: dbalorenzini@yahoo.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar