Solved

Write Conflict error in Access 2010 runtime but not in full version

Posted on 2013-11-12
3
413 Views
Last Modified: 2013-11-13
My database works fine on my computer (with full version of Access 2010). It doesn't on another computer (with Access 2010 runtime). I get a write conflict on that one. I click on a checkbox that is in a continuous subform. It dumps the associated record into another continuous subform for "selected" items. Clicking the checkbox in the "selected" subform removes it from that subform and puts it back into the original subform. It works perfectly with the full version of Access but not the runtime version. When I click on the checkbox I get the 'Write Conflict' error. Why?  How can this be fixed?

Here is the code:

This is for a shipping tag program.

Selects the pallet and part tag numbers on it and puts it in "selected" subform(s):
DoCmd.SetWarnings (Off)
DoCmd.OpenQuery "UpdatePLoadTrk1 in Tag Entry1 to Yes"
Requery
Me.Parent![Pallets To Take Off Truck Test1 subform].Form.Requery
Me.Parent![PalletTagsNotOnTruck subform].Requery
Me.Parent![Tags On Truck].Requery

Unselects the pallet and part tag numbers on it and puts it back in "unselected" subform(s):
DoCmd.SetWarnings (Off)
DoCmd.OpenQuery "UpdatePLoadTrk1 in Tag Entry1 to No"
Requery
Me.Parent![Pallets To Put On Truck Test1 subform].Form.Requery
Me.Parent![PalletTagsOnTruck subform].Requery
Me.Parent![Tags On Truck].Requery
0
Comment
Question by:dave1005
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39644805
Dave,

 I don't think it's matter of runtime vs full, but of the operation.

 My guess is that while on the form, your in the middle of editing a record and then your code runs, which is trying to update the same record.

 To see if that's the case, do the following at the top of the procedures:

 If Me.Dirty = True then Me.Dirty = False

 which will force a save of the current record before the query executes.

 Generally your better off doing nothing outside of the form unless the form is read only.   If it's not, then it's best to work with the forms recordsetclone, but even then, you still can run into problems.

Jim.
0
 

Author Closing Comment

by:dave1005
ID: 39645202
Thank you so much for your response.  This was killing me.  It is always interesting to me that such a big problem can be solved with 1 simple line of code.
0
 
LVL 57
ID: 39645707
Not a problem.   You'll often find these kinds of errors when you move to a slower/faster machine.  In this case, it was the difference between the runtime and the full version, but that's not really what the issue was.

The "runtime" and full version are actually one in the same, it's just a matter of registry keys that decides if you get design features or not.

The other way to fix this would be to leave the check box un-bound, but because your in a continuous subform, you needed to leave it bound so it works for all the rows.

Bit of a rock and a hard place in that regard<g>

Jim.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now