?
Solved

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

Posted on 2013-11-12
3
Medium Priority
?
422 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 58

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 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 58
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
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 …
Viewers will learn the different options available in the Backstage view in Excel 2013.
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…

762 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