DSUM??

  • Thread starter Thread starter GD
  • Start date Start date
G

GD

I want to create a new field with a query, and sum the records in an existing
field, based on the criteria of another field.

In other words, let's say I have an Invoice# field and an InvAmt field. How
do I create a 3rd field in a query that totals all InvAmts for each instance
that a specific Invoice# appears in the Invoice# field?

Would it be a DSUM? Or just a SUM? I know that it's SUMIF as an Excel
formula, but I don't see that in Access. Is there an equivalent?

Thanks for your time!!
 
Thanks, Ken! Can you give me the exact expression? I've tried many
variations with no luck.
 
Can you be specific about the data/fields? Your first post suggests that the
expression might be this:

=DSum("InvAmt", "NameOfTheTable", "[Invoice#]=" & [Invoice#])

The above assumes that you have a field or control named Invoice# on your
form and that that field/control contains the invoice number of interest,
and that that field/control is a numeric field.
 

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

Similar Threads

Keeping, but not counting, duplicate entries 4
DSUM? 7
DSum Total 1
DSum in Query 7
Ungrouping in DSUM 4
DSum 2
2 tables with similar data, possibly dupes... 1
Filter by value 4

Back
Top