Allen Browne

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?
 
A

Allen Browne

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
 
K

Kasey

Thanks roadkill, but if i would have understood what was
in help I wouldn't have posted.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top