Reputation: 19
I have an Access form where users can add new phone numbers for a client. So the form works in the following ways:
[cID][FullName][PhoneType][PhoneNumber][Active]
1 Test ter Mobile 0899955522 []<=(blank check box)
There is an Update button on the form that opens a new form where users can add a new phone number for the client.
When the user adds a new phone number, the phone number is displayed in the Update Phone subform with Active being 0 by default (Active is a checkbox field).
Whenever I click the checkbox to make the phone number active I receive the write conflict error.
Please find the attached image:
I'm the only user currently working on the database. Can someone please help me solve the issue? Thank you all in advance.
Upvotes: -1
Views: 139
Reputation: 45
write conflict happen when two users open same table exclusively , when you click update your table is a record source
for the two forms.
solution:
1- Make clients list Form
Record Source
as Query not Table.
2- make the client relation's phone update Form
to Unbounded Form
with un bounded controls
and use following code to perform update when you click Save and Close
CurrentDb.Execute "UPDATE [Your Table Name ] " & _
"SET [Client Phone Field] ='" & [Phone Number Text Box] & "' " & _
"WHERE [Client ID Field ] = '" & [Your Client ID Text Box] "'"
Upvotes: 0