Go Back   Access World Forums > Apps and Windows > SQL Server

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-30-2019, 05:50 PM   #1
NearImpossible
Newly Registered User
 
Join Date: Jul 2019
Posts: 62
Thanks: 47
Thanked 0 Times in 0 Posts
NearImpossible is on a distinguished road
Write Conflict Error

I have a FacilityNames table with a FacilityID and Facility Name column, I also have a FacilityEquipment Table with several fields and they are related by the FacilityID.

From time to time we need to transfer equipment between facilities so I am just changing the FacilityID for the selected equipment based on the value in the TransferToFacility column.

After running the following Update Query, when I go back into the form that holds the FacilityEquipment table, I am getting a Write Conflict Error whenever I try to select another device to transfer via the Equipment Transfer Checkbox.

I am also running Me.Refresh in the Equipment Transfer Checkbox After Update event, If I comment that out, it I don't get the Write Conflict error, but also the change is not reflected in my table to show the checkbox as being checked

Code:
     UPDATE FacilityEquipment
     SET FacilityID = FacilityNames.FacilityID
     FROM FacilityEquipment, FacilityNames
     WHERE FacilityNames.[Facility Name]=FacilityEquipment.TransferToFacility AND FacilityEquipment.[Equipment Transfer]=1
Can someone shed some light on what i'm doing wrong?


Last edited by NearImpossible; 09-30-2019 at 05:57 PM.
NearImpossible is offline   Reply With Quote
Old 09-30-2019, 06:57 PM   #2
NearImpossible
Newly Registered User
 
Join Date: Jul 2019
Posts: 62
Thanks: 47
Thanked 0 Times in 0 Posts
NearImpossible is on a distinguished road
Re: Write Conflict Error

I figured it out, earlier I was messing with a timestamp field and decided to not use it, however the existing records were affected by it.

I wiped the table and entered new records and everything is working as desired....
NearImpossible is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Write Conflict Error :( NewShoes Forms 23 11-17-2011 09:26 AM
Write Conflict Error mikebrewer Modules & VBA 1 09-27-2011 09:35 PM
Question Best way around Write Conflict Error WineSnob General 2 07-07-2011 03:57 PM
Write Conflict Error danny123 General 1 06-09-2009 11:13 AM
Write Conflict Error MsMarker General 0 01-29-2007 11:39 AM




All times are GMT -8. The time now is 12:11 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World