Balance Fwd + DSum

Indigo

Registered User.
Local time
Today, 17:15
Joined
Nov 12, 2008
Messages
241
I need some help in trying to create a balance forward
field on a report. I am running Access 2003 and I
want to be able to produce a report by employee
number to show total "points" accumulated. I want
the employee to be able to select a date range for
the report (i.e. from the first of the month) and
have a balance forward field on the report that
shows the total accumulate points up until the first
date on the report.
I have tried DSum as follows:

=DSum("Points","CatchTable","[EmpNumber] =
" & Forms!frmSelectEmp!EmpNo & " AND
[CatchDate] <= #" & Forms!frmSelectEmp!StartDate & "#")


and I get # Name? as my result. What am I missing
or should I be writing a subquery. I am at a loss
as to how to proceed to get what I need.
 
Can't see anything obvious. You could try putting square brackets round the field "points":
Code:
=DSum("[COLOR="Red"][[/COLOR]Points[COLOR="red"]][/COLOR]","CatchTable","[EmpNumber] = " & Forms!frmSelectEmp!EmpNo & " AND [CatchDate] <= #" & Forms!frmSelectEmp!StartDate & "#")

Also, what happens if you put a date and Employee number in:
Code:
=DSum("Points","CatchTable","[EmpNumber] = 12345 AND [CatchDate] <= #1/1/9#")

Is EmpNumber really a number field or is it text?

Is there value data for the criteria you are giving?

Try deleting the text box on your report and starting again.

Just a few ideas.

Chris
 
Thank you so much....it was the square brackets overall.

Its working perfectly now.
 

Users who are viewing this thread

Back
Top Bottom