Display "No details" if subreport has no records

  • Thread starter Thread starter Dale Fye
  • Start date Start date
D

Dale Fye

I've got a report that has group headings which may or may not have detail
information (in a subreport). I've got the subreport Can Shrink set to True,
but would like to display something like "No details" in a textbox where the
subreport should be, if the there are no records in the sub.

Any recommendations on how to do this?
 
Dale,

Try this... Put a label, lblNoDetails, with a caption of "No Details"
behind your subreport. In the On_Format section place the below code
changing the name to your subreport.

If Me.YourSubReport.Report.HasData Then
Me.lblNoDetails.Visible = True
Else
Me.lblNoDetails.Visible = False
End If


--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
Back
Top