can someone please tell me what is wrong in syntax of this statement
Dim strUser As String
Dim dbs As DAO.Database
Set dbs = CurrentDb
Dim sql As String
strUser = Environ("Username")
sql = "INSERT INTO LogTable(Username,Date,Time,EditFields) VALUES('strUser',date,time,'New Mailbox created');"![]()
![]()
dbs.Execute sql
It keeps giving a syntax error in "Insert Into" statement. Thanks
Oh .. forgot to mention.. the LogTable has five fields (the first one is autogenerated number). Can it be the reason for the error?




Reply With Quote