dsum problem

p0welly

Registered User.
Local time
Today, 12:13
Joined
Aug 26, 2004
Messages
38
Code:
str = "[CustomerID] = " & Reports!rptAccountMonthly!CustomerID & " And [ControlDate] >= #" & [Forms]![frmAccountManagement]![StartDate] & "#  And [ControlDate] <= #" & [Forms]![frmAccountManagement]![EndDate] & "#"
varMonth1Charges = DSum("Amount", "[tblAccount]", str)

The above is returning null when I know if i look in the table it should have a value, can anyone see an error.
 
I cant see an error, but what I would do is to stick a debug.print Str
line in there so that you can check just what is being used as the filter. It should help you narrow down the problem.
It may be that you are returning UK style dates rather than US.

Peter
 

Users who are viewing this thread

Back
Top Bottom