No Records in Subform

  • Thread starter Thread starter DD
  • Start date Start date
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.
 
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
 
Back
Top