Control Source Issue

  • Thread starter Thread starter Jini
  • Start date Start date
J

Jini

I collect data on Course/ID/Attendance Rcvd (y/n)/Evals
Rcvd (y/n). Once a month I have to send a report showing
what classes have NO's under Attendance and/or Evals. At
the bottom of my report I have a formula =count([course])
to tell me how many courses are on the report. The
problem is that if there are no lines in the report
(everything has been received), instead of a 0, the total
reports #error. I have tried everything and cannot figure
out how to get the report to show 0 if there is nothing
outstanding. Can anyone tell me what I should put in the
control source to do this?

Thank you so much in advance.
 
Jini said:
I collect data on Course/ID/Attendance Rcvd (y/n)/Evals
Rcvd (y/n). Once a month I have to send a report showing
what classes have NO's under Attendance and/or Evals. At
the bottom of my report I have a formula =count([course])
to tell me how many courses are on the report. The
problem is that if there are no lines in the report
(everything has been received), instead of a 0, the total
reports #error. I have tried everything and cannot figure
out how to get the report to show 0 if there is nothing
outstanding. Can anyone tell me what I should put in the
control source to do this?

Check if the report has any data by using its HasData
property:

=IIf(Report.HasData, Count(Course), 0)
 
-----Original Message-----
Jini said:
I collect data on Course/ID/Attendance Rcvd (y/n)/Evals
Rcvd (y/n). Once a month I have to send a report showing
what classes have NO's under Attendance and/or Evals. At
the bottom of my report I have a formula =count ([course])
to tell me how many courses are on the report. The
problem is that if there are no lines in the report
(everything has been received), instead of a 0, the total
reports #error. I have tried everything and cannot figure
out how to get the report to show 0 if there is nothing
outstanding. Can anyone tell me what I should put in the
control source to do this?

Check if the report has any data by using its HasData
property:

=IIf(Report.HasData, Count(Course), 0)
--
Marsh
MVP [MS Access]
.
EXCELLENT - THANK YOU.
 
Back
Top