Solved

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

Posted on 2013-11-12
3
417 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

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…
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…
Viewers will learn the different options available in the Backstage view in Excel 2013.
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 …

810 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