Dsum Syntax Problem

  • Thread starter Thread starter ashley
  • Start date Start date
A

ashley

I have designed a report in Access 97 and need help with
the syntax of a calculated field named [total]
Currently, it counts all the attendance hours in the
attendance_clock_in table for a particular student and
then subtracts that number from another field on the
report. This works fine.

=Format(Nz(DSum
("dailyhours","attendance_clock_in","studentid=" &
[employeeid]),0),"0.00")-[sumofhours]

However, what I want it to do is count only the
attendance
hours in the attendance_clock_in table up to a particular
date that the user needs to get prompted to enter when
the
report runs.

First, how would the syntax look to do that and if I
prompt the user to enter the ending date, can I use that
field when doing the calculation?

P.S. [dailyhours] is a number field in the
attendance_clock_in table, [studentID] is a number field
on the report and [employeeid] is a number field in the
table. [sumofhours] is another number field on the
report.
..
 
Dsum() is rarely required or necessary in a report. Is attendance_clock_in
in the record source of the report?
 
Back
Top