I have created a database called TradeShow.accdb. I have two tables: The first Table is called
Product which holds code, product , price, and Unit Balance (Named Available) in the table.
I have another Table called Product Orders. I have linked the two tables by the Code which is a Primary Key on the product table only and created a Select Query. This Select Query called ProductOrdersRec is used for input of orders. This is whats happening, I enter the Code A6000 with 5 units as a quantity. There are 1000 units available for sale in the product table.
The query runs and takes the Available which is 1000 and suibtracts 5 giving a QtyBalance of 995. This query is running everytime it is pulled up and subtracting 5 units again on the A6000 even though the A6000 is not even being ordered. My question is this: Do I need to have an order form using a table and not a select query? I need for the available balance to update, but only when I order that A6000 code again or someone else creates an order for it.
I have attached my database along with the two tables and the query that is linking the two tables.
I have a coding issue also called Error which I have attached. How can thsi code be written to work and exceute and not give an error.
Any hep with this project is very helpfull.