LittleNick
Technical User
Greeting,
TheAceMan1 once showed me how to run command to insert a record into SQL table. I implemented and the codes ran fine. Now I have a very similar process that is attached to a different control, and when I run it I get a "run-time error '3': Closing delimiter not found for the string beginning at position250 in the command. The string begins with: ')}."
This is the code:
The thing is not everytime I receive this message and when the message pops up, I notice it still write the record into SQL table. However, I just want to see what did I do wrong so that I can correct it.
Thanks for your suggestions or helps
TheAceMan1 once showed me how to run command to insert a record into SQL table. I implemented and the codes ran fine. Now I have a very similar process that is attached to a different control, and when I run it I get a "run-time error '3': Closing delimiter not found for the string beginning at position250 in the command. The string begins with: ')}."
This is the code:
Code:
Dim db As DAO.Database, strSQL As String
Dim CurrentUser As String
CurrentUser = DLookup(……)
Set db = CurrentDb
strSQL = "Insert into tblUpdateTracking (Userid, datestamp, ValueBefore, ValueAfter, FileID, Description) " & _
"Values ('" & CurrentUser & "', '" & Now() & "', '" & varBefore & "', '" & Me!OrderNumber & "', " & _
"'" & Me!FileID & "', '" & Me!Description & "')"
DoCmd.RunSQL (strSQL)
The thing is not everytime I receive this message and when the message pops up, I notice it still write the record into SQL table. However, I just want to see what did I do wrong so that I can correct it.
Thanks for your suggestions or helps