I have VBA behind a membership management form that allows a user to assign a contactID to multiple parcel records in a table at once. When the user updates the contactID for one of the parcel record using the form, a pop up asks if the update should be applied to all remaining parcel records. If the user clicks yes, then the contactID is updated for all parcel records. When the update involves adding or changing the contactID to a number, the code works fine. When the update is to remove a contactID (i.e. clear it out to set as null), then a syntax error pops up. I'm not sure how to edit the VBA to update the contactIDs for all parcels to null in these cases.
current vba:
CurrentDb.Execute "UPDATE tbl_Parcels SET tbl_Parcels.ContactID = " & Me.ContactID & " WHERE MemberID = " & Me.MemberID
The issue occurs when me.ContactID = null
The table does allow nulls in the field. We tried changing the = to "is" and that did not solve the problem.
Thanks for your help!