View Full Version : Calculating across tables


database_learner
03-17-2008, 03:34 PM
Hi,
I think this should be simple, but I am struggling to work it out

In a relational database I have a stock table containing stock and quantities, there is a customer table with an order table used as the link table also containing quantities.

What I am trying to do is place an order using an order form linked to the order table, automatically reducing the stock table by the amount ordered.

I have tried an update query with no success, also tried using the builder to make a query and linked it to the stock table with no success.

I would be grateful for any ideas, I am sure it is relatively simple

pbaldy
03-17-2008, 03:49 PM
Generally speaking you shouldn't try to store a calculated value. Good discussion on inventory here:

http://allenbrowne.com/AppInventory.html

database_learner
03-17-2008, 11:55 PM
Thanks, it is more difficult than I expected though

Regards
Paul

pbaldy
03-18-2008, 07:46 AM
Sales/inventory is certainly not the easiest. Post back if you get stuck.