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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top