473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Write Conflict

I have been getting a message about a 'Write Conflict' when moving between forms, and am struggling to understand the issue.

I am using Access 2007, and have a relational database with around 10 tables of data and around 40 tables used as LookUp for ComboBox controls. I have more than one form bound to some tables, but only one form loaded at a time. after adding or editing data, I click a command button which opens the next form then closes the current form. That is when I get the message "This record has been changed by another user since you started editing it" I then have three options: Save record, Copy to clipboard and Drop changes.

When I did some research on this issue, it seems the explanation is record locking, as the first form is editing data on 'part' of the table which the second form reads/writes to as well.

The solution from Microsoft was to change the record locks at form level to 'Edited Record', on both forms. I did this and still receive the same message. The second suggestion, also from Microsoft was to add the following code in the On deactivate event:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.RunCommand acCmdSaveRecord
Again, this did not solve the issue.

To complicate matters I also get this message when I switch between forms that are NOT bound to the same table, which can't be down to record locks.

Has anyone else experienced this?
Aug 16 '12 #1
6 11030
TheSmileyCoder
2,322 Expert Mod 2GB
Try to change your code so that it closes the form first before opening the next form. Then there shouldnt be a write conflict at all.
Aug 16 '12 #2
TheSmileyCoder,

Thanks for taking the trouble to reply. I did try closing form 1 before opening form 2, but still received the same message. I also get the same write conflict message when opening a second form not bound to the same table, so the issue, I suspect, is nothing to do with locks, this may be a confounding error masking something else.

I never used to get this on earlier versions of the same database which used the same method of moving between forms bound to the same table, which also suggests this is not strictly an issue of locks.

Any further ideas would be appreciated!
Aug 17 '12 #3
I seem to have found a solution to the 'Write Conflict. I use the following code before opening the second form:

Expand|Select|Wrap|Line Numbers
  1. RunCommand acSaveRecord
That seems to avoid any conflicts with multiple forms bound to the same table.
Aug 17 '12 #4
TheSmileyCoder
2,322 Expert Mod 2GB
If the form is dirty (I.e. a edit/new record is in progress) then it will automatically save when you close the form, which is why I suggested to close Form 1 before opening form 2. However without a full posting of your code, its hard to be sure exactly what it is your doing, in which event and in which order.


If you are the only user of the database then you don't need to have record locks at all. If you have read up a bit on recordlocks you will probably have realised that locking the "Edited Record" is actually a bit more complicated then simply locking the edited record as it will also lock any records located in the same filepage.
Aug 17 '12 #5
TheSmileyCoder

Thanks for your reply, all useful information.
Aug 18 '12 #6
@bigukfan
Thank you so much bigukfan!
It was over a week headache until I found your solution which helped me a lot.
As you mentioned above, none of the Microsoft solutions worked.
just I used the following code I/O yours.
BTW, Thanks again for your help :-)

Expand|Select|Wrap|Line Numbers
  1. DoCmd.RunCommand acCmdSave
Sep 18 '16 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Max | last post by:
Hi, I have SqlServer 2000 as back end and Access 2000 as front-end. All tables from Sqlserver are linked to Access 2000. I am having write conflict problem with one of my form which is bound to...
2
by: RC | last post by:
I am getting the following error message. "Write Conflict this record has been changed by another user since you started edting it. If you save the record, you will overwrite the changes...." I...
1
by: shumaker | last post by:
I've loked over older messages on this, but haven't found a solution. I have a datasheet of records, and each record has a subform that can be viewed with the expand '+' symbol. The subform...
5
by: Simon | last post by:
Dear reader, I have two Forms they are both working with dada from the same tables. By typing in some changes in Form-B the changes are also visible in Form-A. There is no record lock...
1
by: Kuriandungu | last post by:
Hi guys I've read the posts on Write conflict entered in this forum (along with some from kbAlertz and microsoft) and i have tried all the solutions without success. let me give you some background....
4
by: crystal | last post by:
I've checked the threads but haven't been able to come up with a solution to my issue. Help...... I have a simple form based on a table. Within the form is a subform that is also, through a Q,...
1
by: lorirobn | last post by:
Hi, I have a query that I have been using as a record source for a form with no problems. I just created a new "addnew" form, and added 20 records to the table with this form. The problem I...
8
by: christianlott1 | last post by:
After searching the group and the net, I just can't believe after all this work I'm going to have to sit through three Write Conflict messages when I want to roll back and delete a record. The...
1
by: S.Dickson | last post by:
I have a database with access as front end and Mysql as back end. I am gettting the following 'Write Conflict' Error. when i am on my order form, This form does has a subform where i enter all the...
6
by: jpatchak | last post by:
Hello, I have a main form with one subform. I have a command button on the main form to delete the current record. Below is my code. The tables on which the main form and subform are based...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.