No Records in Subform

D

DD

I want to display a message to indicate there are no
records in a recordset if there is no subform data to
display. My report consists of data based on one query. My
subform is based on a different query with a common ID
field between the two. Thank you.
 
M

Marshall Barton

DD said:
I want to display a message to indicate there are no
records in a recordset if there is no subform data to
display. My report consists of data based on one query. My
subform is based on a different query with a common ID
field between the two.


Create a label control in the same section as the subreport
(I hope you didn't really mean subform). Place the label
control where you want it to appear even if it's on top of
the subreport control.

Now add a little code the section's Format event:

Me.thelabel.Visible = Not Me.subreport.Report.HasData
Me.subreport. Visible = Me.subreport.Report.HasData
 

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

Similar Threads


Top