S
stuart.medlin
I have set up a report in Access 97 which I call from a form, passing
a SQL string to the report. In the Report footer, I have set up 2 text
fields and set the control source for each to sum up one of the fields
on the report:
=Sum(IIf([TransCode]="NO SAMP - DISINFECTANT",1,0)) and
=Sum(IIf([TransCode]="NO SAMP - FORMULATION",1,0))
However, if the report has no data, I get the following error message
in the Report Footer Format event "You entered an expression that has
no value" (run-time error '2427'). In the Report Footer, it is giving
me the text field where I have set the control source as giving me the
error.
How do I stop this event from executing or is there anything I can
check in the event code so I can exit the event? Or, even better, keep
the report from loading?
Thanks in advance.
Stuart
a SQL string to the report. In the Report footer, I have set up 2 text
fields and set the control source for each to sum up one of the fields
on the report:
=Sum(IIf([TransCode]="NO SAMP - DISINFECTANT",1,0)) and
=Sum(IIf([TransCode]="NO SAMP - FORMULATION",1,0))
However, if the report has no data, I get the following error message
in the Report Footer Format event "You entered an expression that has
no value" (run-time error '2427'). In the Report Footer, it is giving
me the text field where I have set the control source as giving me the
error.
How do I stop this event from executing or is there anything I can
check in the event code so I can exit the event? Or, even better, keep
the report from loading?
Thanks in advance.
Stuart