Skip to main content
Topic: Subtract quantity from one table to another (Read 1220 times) previous topic - next topic

Subtract quantity from one table to another

Hello everyone!
A query, it is possible in an inventory table, to have a preloaded item quantity. In another, when taking an amount, subtract from the table where X amount was charged? I was testing shapes but I can't find any. I ran this in asp with a procedure. But, here I am a little lost.

Re: Subtract quantity from one table to another

Reply #1
Hello everyone!
A query, it is possible in an inventory table, to have a preloaded item quantity. In another, when taking an amount, subtract from the table where X amount was charged? I was testing shapes but I can't find any. I ran this in asp with a procedure. But, here I am a little lost.


As an example, an inventory table, where I have quantity of the product in stock 300. A sales table, where I put the quantity to sell 50. How can I subtract 50 from the stock table automatically? I was testing with action before add and action after add. But I did not have good results, any suggestions or help? Thank you!!!


Re: Subtract quantity from one table to another

Reply #3
@ddiaz2380Action Before Add and Action After Add is the best way of achieving what you are trying to do.

Hi @willvin 
I tried to use that function, but without success, could you be so kind as to give me a little example please? Thank you!!