Subreport is empty...need to show "No Records Found"

K

Kathy

I have a report with a subreport. I understand that when there are no records
in the subreport then it will display empty. I read in another thread that
you can put a control behind the subreport that will be visible when the
subreport is empty. I am trying to do this with a control that ="No Records
Found", but the control still shows up when the subreport has data. I tried
the On Format suggestion, but did not work out. I am a novice, so it was
probably my mistake...any further help is much appreciated.
 
D

Duane Hookom

Set the control source to something like:

=IIf(sbrptctrlName.Report.HasData,Null, "NO DATA")
 
K

Kathy

Thank you for your reply. I am still having problems...sorry, I am probably
doing something "obvious", but just not to me. Anyway, this is what I am
entering in an unbound textbox on the main form (not subform):
=IIf(strStatus.Report.HasData, Null, "No Data")

strStatus is on the subForm. But I am getting "#Name?" as the response.
Again many thanks for your help.
 
K

Kathy

Oops, just dawned on me...as had it in the wrong section. It is now
working...many thanks!
 

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

Top