I have a form (frmClient) which includes a locked textbox txtLastModifedBy which is bound to tblClient.LastModifiedBy.
When other controls on the form are updated, the form's BeforeUpdate event triggers some code which includes the line
DoCmd.RunSQL "UPDATE tblClient SET tblClient.LastModifiedBy = 'user' WHERE tblClient.ClientID= 10;"
I've used ClientID=10 to make sure there's no problem with how I'm defining the current record (previously I had ClientID= {value of ClientID textbox}).
The error message that appears is Write Conflict: "This record has been changed by another user since you started editing it. If you save the record you will overwrite the changes the other user made." 3 options are presented: Save record; Copy to clipboard; Drop changes.
What I think is happening is that the textbox txtLastModifedBy is bound, so it is preventing changes from the code. I can't expect my users to use the database like this. I've looked through previous posts about write conflicts but couldn't see anything that would help in this case. Any ideas?

When other controls on the form are updated, the form's BeforeUpdate event triggers some code which includes the line
DoCmd.RunSQL "UPDATE tblClient SET tblClient.LastModifiedBy = 'user' WHERE tblClient.ClientID= 10;"
I've used ClientID=10 to make sure there's no problem with how I'm defining the current record (previously I had ClientID= {value of ClientID textbox}).
The error message that appears is Write Conflict: "This record has been changed by another user since you started editing it. If you save the record you will overwrite the changes the other user made." 3 options are presented: Save record; Copy to clipboard; Drop changes.
What I think is happening is that the textbox txtLastModifedBy is bound, so it is preventing changes from the code. I can't expect my users to use the database like this. I've looked through previous posts about write conflicts but couldn't see anything that would help in this case. Any ideas?
