[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2013-11-12
3
Medium Priority
?
423 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

650 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