Write Conflict Error (1 Viewer)

NearImpossible

Registered User
Joined
Jul 12, 2019
Messages
148
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:

NearImpossible

Registered User
Joined
Jul 12, 2019
Messages
148
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....
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom