Dsum with two criteria

G

Guest

I have a form that includes a subtotal pulled from a subform. My problem is
that I need the subtotal to only include the current record and also only
include values for a specific text value. We are a sales rep firm and a
particular job may have purchase orders issued to us and also to the company
we are representing, I need to know when viewing a record the total of any
purchase orders issued in our name, but I also need the record to note the
amount of any purchase orders issued to the company we represent. Here is
what I have so far:

=Dsum("[Amount]","[SalesInfo]","[PO Issued To:]='Griffin'")

It works but right now it is returning the value of all the POs issued to
Griffin in total, I need to have it return the subtotal for POs issued to
Griffin but only for the current record.
 
G

Guest

What uniquely identifies the current record that would also limit the records
in the salesinfo table to that identification? That is all you need to know.
It is possbile to use multiple criteria for a DSum.

=Dsum("[Amount]","[SalesInfo]","[PO Issued To:]='Griffin' AND
[AnotherFieldValue] = 'something in the current record'")
 

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