By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,165 Members | 850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,165 IT Pros & Developers. It's quick & easy.

Mathematical Operations between tables

P: 1
I have tblInventory that contains multiple fields and the "Quantity" field. I also have another table tblInvoice containing multiple fields and the "Quantity Bought" field. How, whenever I enter a number in "Quantity Bought" to be subtracted from "Quantity"?
Dec 23 '16 #1
Share this Question
Share on Google+
1 Reply


PhilOfWalton
Expert 100+
P: 1,430
Basically, you don't.
You should calculate the balance which is going to be something like

Balance = OriginalQuantity - DSum("QuantityBought", "TblInvoice", "InventoryID = " & InventoryID) + DSum("QuantityDelivered", "TblDeliveries", "InventoryID = " & InventoryID)

No Idea what your table structure are, it's all a lot of guesswork.
That is the normal way to do stock control, but I feel sure there are plenty of examples on the Web.

Phil
Dec 27 '16 #2

Post your reply

Sign in to post your reply or Sign up for a free account.