Quantity Control

thunderbolt1164

Registered User.
Local time
Today, 08:42
Joined
Mar 2, 2008
Messages
32
Hello

Have been working on a DB for awhile now and am now stuck at Quantity control.

I have 5 different types of Transactions which are picked by which Button you click.

Drop-Offs =Addition
Pick-Ups =Addition
TearDowns =Subtraction
Sales =Subtraction
Shipments =Subtraction

I was wondering if there is a way to use the If and Then Statment or the IIf Statment, with the [Transaction Type] to either ADD to, or SUBTRACT from, the [UnitsInStock]? Depending on what Button was Clicked.
 
if all these transactions are stored in a single table, the easiest way is to store the actual effect of the transaction

so store sales,teardowns etc with negative quantities

then you can just sum transactions over any range toget the net movement

-------
otherwise if you are storing all movements as positive, then have a tranrtype lookup table, with a sign indicator (ie +1 or -1) for each trantype, and use that as a multiplier applied to the actual qty.


first way is much easier/better though
 

Users who are viewing this thread

Back
Top Bottom