I am using a command button from a form (Access 2000) to produce a report. The form and the report each have a subform (subreport). Here is the expression that produces a total for one field on the report.
=nz([Tech Assist Subreport]![Total Service Hours])+nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours])
This expression works perfectly as long as there is a value for the [Tech Assist Subreport]![Total Service Hours])
If [Tech Assist Subreport]![Total Service Hours]) has no value, that subreport is blank on the report and the total expression results in "Error"
I have also tried this expression:
=IIf(IsNull([Tech Assist Subreport]![Total Service Hours]),nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours],nz([Tech Assist Subreport]![Total Service Hours])+nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours])))
Same error is produced. Any ideas are welcome!
=nz([Tech Assist Subreport]![Total Service Hours])+nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours])
This expression works perfectly as long as there is a value for the [Tech Assist Subreport]![Total Service Hours])
If [Tech Assist Subreport]![Total Service Hours]) has no value, that subreport is blank on the report and the total expression results in "Error"
I have also tried this expression:
=IIf(IsNull([Tech Assist Subreport]![Total Service Hours]),nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours],nz([Tech Assist Subreport]![Total Service Hours])+nz([CaseLaw Updates Hours])+nz([DefenseNET Newsletter Hours])+nz([Defense Magazine Hours])+nz([Brief Bank Hours])+nz([Other Publication Hours])+nz([Amicus Hours])+nz([Training Performed Hours])+nz([Training Attended Hours])+nz([Administration Hours])+nz([Collaboration Hours])))
Same error is produced. Any ideas are welcome!