DSUM report (1 Viewer)

mveijndh

Registered User.
Local time
Today, 09:59
Joined
Dec 17, 2011
Messages
113
I'm trying to generate a total sum in Invoice report. It does not seem to collect the right data. Can I use multiple Criteria in a Dsum?

Code:
TotalExpenses: DSum("[tblExpenses]![ExpDeclarationValue]";"queInvoiceExpenses";"Month( [tblExpenses]![ExpDate] =1) And [tblExpenses]![EmployeeID] =1")

Thanks in advance
 

cyanidem

Nieóhfytny jaszczomp
Local time
Today, 17:59
Joined
Nov 30, 2015
Messages
106
You have incorrect number of opening and closing brackets, and some in wrong place as well. try:

Code:
TotalExpenses: DSum("[tblExpenses]![ExpDeclarationValue]";"queInvoiceExpenses";"Month([tblExpenses]![ExpDate])=1 And [tblExpenses]![EmployeeID]=1")
 

mveijndh

Registered User.
Local time
Today, 09:59
Joined
Dec 17, 2011
Messages
113
Hi,

This does provide better results, but it does not line up with the checked results. Is there a way to check what records the DSUM has used?
 

mveijndh

Registered User.
Local time
Today, 09:59
Joined
Dec 17, 2011
Messages
113
Hi,

I've changed the DSUM to:

Code:
TotalExpenses: DSum("[queExpensesOpen]![ExpDeclarationValue]";"queExpensesOpen")

Found the issue!
 
Last edited:

Users who are viewing this thread

Top Bottom