One hint would be to assign the string to a variable, then print it to the immediate pane (ctrl+g)
[tt]Dim SQL As String
SQL = "UPDATE tblAccountSchemes SET tblAccountSchemes.DelOrInstAttached = -1" & "WHERE ((tblAccountSchemes.ActivityID)=([Forms]![FrmSchemes].ActivityID)));"
Debug.Print SQL[/tt]
The SQL you pick up, you should be able to run by dumping it into the SQL view of the query builder...
Here, there is at least two errors
1 - lacking space between -1 and WHERE
2 - though it might work sometimes, what you enter into the string, is the reference, not the value
[tt]SQL = "UPDATE tblAccountSchemes SET " & _
"DelOrInstAttached = -1 " & _
"WHERE ActivityID = " & Forms!FrmSchemes!ActivityID[/tt]
Should the code be on the current form, you could use
Me!ActivityID in stead of the complete form reference.
Roy-Vidar