Allen Browne

  • Thread starter Thread starter Kasey
  • Start date Start date
K

Kasey

"How do I update the Quantity On Hand each time an item is
sold/used?" The simple answer is: You don't! You calculate
the value when you need it.

The calculation is very simple: the total number acquired,
less the number disposed of. Just use DSum() on the table
of acquisitions to get the number acquired for any
product. Another DSum() expression on the table of
uses/invoices gets the number disposed of. For the
simplest databases, that's all you need.

Can You explain this...DSum() on the table?
 
Hi Kasey

DSum() is build into Access.
To sum a field named "Quantity" from a table named "Sales", use:
=DSum("Quantity", "Sales")

To limit the result to only the sales of ProductID number 64, use:
=DSum("Quantity", "Sales", "ProductID = 64")

For more information, see our explanation of DLookup at:
http://allenbrowne.com/casu-07.html
 
Thanks roadkill, but if i would have understood what was
in help I wouldn't have posted.
 
Back
Top