What is wrong with my insert syntax? My code is running fine not giving me an error. The problem is the code is not actually inserting the CurrentUser into the table. The code seems to be running fine all three message boxes are popping up. Any help would be appreciated.
Thank You,
rjoshi2
My code:
Private Sub OCB_AfterUpdate()
Dim insertID As String
MsgBox ("User ID: " & CurrentUser)
insertID = "INSERT INTO FY03COMREG( [User ID] ) " & _
"VALUES('" & CurrentUser & "') ;"
MsgBox ("User ID: " & CurrentUser)
CurrentDb.Execute insertID
MsgBox ("User ID: " & CurrentUser)
End Sub
Thank You,
rjoshi2
My code:
Private Sub OCB_AfterUpdate()
Dim insertID As String
MsgBox ("User ID: " & CurrentUser)
insertID = "INSERT INTO FY03COMREG( [User ID] ) " & _
"VALUES('" & CurrentUser & "') ;"
MsgBox ("User ID: " & CurrentUser)
CurrentDb.Execute insertID
MsgBox ("User ID: " & CurrentUser)
End Sub