Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Best Way to handle stock.

Status
Not open for further replies.

softbrix2

Technical User
Feb 28, 2005
17
US
I need to handle the stock on hand for each purchase made. 1 purchase can have muitlple products with each product have diferent qty. Currently I have a stock table that keep the stock on hand, in my order form after update of each qty field I do a subtraction from the stock table via mysql.
DoCmd.RunSQL "UPDATE products SET Stock=Stock - " & Forms!Orders![Order Details Subform].Form!Quantity & " WHERE ProductID=" & Forms!Orders![Order Details Subform].Form!ProductID

the problem I have with this is that I need to do a insert for each product ordered, currently its only doing it for the last product. Is there a better way to handle stock? if so can someone please point me to an example where they are checks and balances for the quantity sold/remain
 
A sample database "Orders" shipped with Office 2000 (I'm not sure it comes with Office 2003 or not) deals with the same situation as yours. You may check it out.

Seaport
 
ok i've looked at the office 2000 inventory control but I don't see how if calc total sold compages to total ordered/on hand.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top