Subreport problem when no record exists

  • Thread starter Thread starter AkAlan via AccessMonster.com
  • Start date Start date
A

AkAlan via AccessMonster.com

I have a text box that calculates data from other text boxes, one of which is
from a subreport. When there are no records for the subreport the calculated
text box gives me a #ERROR. I have tried the nz function but still get the
error. I would like to trap for no records in the subreport so I can run some
code but can't figure out how to do that. Thanks for any help.
 
You should provide the control source of the text box. However, generically,
you can use:
=IIf(sbrptControl.Report.HasData, sbrptControl.Report!txtName, 0)
 
Back
Top