Display "No details" if subreport has no records

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?
 
G

Gina Whipp

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
 

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