Inventory using Update Query

L

Lili

Hi, I have these tables
Customers(CustomerID (PK), and all customer info)
Sales(SalesID (PK), CustomerID, Date)
SalesDetails(SalesID (PK), ProductID (PK), UnitPrice,
Quantity)
Products(ProductID (PK), ProductName, UnitsPrice,
UnitsInStock)

I also have aan order form contains the customer info and
order subform contains the productID, price, and quantity
(from SalesDetails table). I use an update query and
insert it on before update so that when the quantity is
entered it will automatically reduce the UnitsInStock in
Products table. the problem is, when an employee entering
the quantitiy, and if the customer change his mind and
want to order diferent quantitiy, the query only update
my first change. I also try another way, which is using a
command button to run a macro to open the update query,
but when there are two products, it will only subtract
the units in stock by the quantity of the last Product,
and leave the other unchanged. Please help!! thank you a
ton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top