I am getting an intermittent error with my database running on SQL server with on-click actions written in VB.
The error is...
When I go to Debug it highlights the following area of code as a problem:
Is there anything strange-looking about this piece of code? I've had no troubles with this sort of thing in the past so am at a loss.
It seems to be happening intermittently too, which is weird.
The error is...
Run-time error '3134'
Syntax error in INSERT INTO statement
When I go to Debug it highlights the following area of code as a problem:
Code:
actioned_by = Environ("username")
SQL = "INSERT INTO dbo_ipms_user_change (ipms_user_id, username, change_type, action_date, actioned_by, user_change_source, user_change_summary, user_change_description, ipms_change_id) SELECT " & ipms_user_id & ", '" & username & "', 'no change', Now(), '" & actioned_by & "', 'leavers list', '" & leavers_list_notes & "', '', " & leavers_list_multichange_id & ""
DoCmd.SetWarnings False
DoCmd.RunSQL SQL
DoCmd.SetWarnings True
Is there anything strange-looking about this piece of code? I've had no troubles with this sort of thing in the past so am at a loss.
It seems to be happening intermittently too, which is weird.