Form not Updateing Table through SQL Statement (1 Viewer)

dalaister

New member
Local time
Today, 10:54
Joined
Jun 19, 2021
Messages
1
I designed a database for checking and returning technology equipment. Have 2 tables, tblEquipment that stores the devices and Qty, tblEquipmentSignOut that stores the checked out or returning devices from the users. One to many relationship.
After filling out the Signout form with Equipment Name, Model and Serial # then select "Checked Out" or "Returned". On the After Update event it runs the SQL update to update the tblEquipment Qty to 0 if Checked Out but when I check the tblEquipment for the device and it's Qty, it didn't update to 0 instead it's still 1. I also have a button for "Update" and that does the same thing but with a different SQL statement for updating just to try and it does update the Qty but sometimes it updates other devices when it should have updated the current device that I'm trying to Check Out or Return.

Any help would greatly be appreciate it. Attached is the database.
Thank you greatly.
 

Attachments

  • Equipment_SignOut21SubForm_Redone_13_Update_Eqty_Issue.accdb
    6.4 MB · Views: 323

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 23:54
Joined
May 7, 2009
Messages
19,169
you do not Need to update tblEquipment, you just create
a query Calculating the balance.

see qryTotalOutAndReturn

and the Final query: Query1.
 

Attachments

  • Equipment_SignOut21SubForm_Redone_13_Update_Eqty_Issue.accdb
    6.4 MB · Views: 271

Users who are viewing this thread

Top Bottom