Dsum usage (limiting to a certain item)

V

Veli Izzet

Hi all,

I need to have the sum of all transactions for a certain item ONLY on
the from of that item.

using Dsum(Quantity, Table) gives the total Quantity of ALL items.

I tried Dsum(Quantity, Table, ProductId=Me!ProductID) with a Null result.

Any help?
 
A

Allen Browne

Where are you using this? If in the Control Source of a text box on a form,
try:
=DSum("Quantity", "Table", "ProductId = " & [ProductID])

DSum() takes the same arguments as DLookup(), which is explained in this
link:
http://allenbrowne.com/casu-07.html
 
Top