Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSum and DCount in Report

Status
Not open for further replies.

Mordacia

Technical User
Jan 24, 2002
13
US
I have an accounts payable database (tblAllFields) with fields of Vendor, Amount and Date Paid for 1200 items dating from 1996 to the present time. I want to create a report that will calculate the total amount paid per vendor per year and that will also show total items paid per vendor per year.

I have set up the report as follows:

In the Page Header:

Vendor Name (Label) 1996 1997 1998 1999, etc. (All Labels)

In the "Vendor Name" Header:

Vendor Name (Text1 - control field "Vendor Name")
Total Amount (Label):
Total Items (Label):

In the Detail Section:

Amount (Text2 - control field "Amount")
Date Paid (Text3 - control field "Date Paid")

I put this formula into a textbox next to Total Amount Label:
=DSum(&quot;[Text2]&quot;,&quot;tblAllYears&quot;,&quot;[text3] < #01/01/1997#&quot;)

It does not give me correct sums or counts for each vendor for this parameter, however. What am I doing wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top