A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Display "No details" if subreport has no records



 
 
Thread Tools Display Modes
  #1  
Old December 2nd, 2009, 03:56 PM posted to microsoft.public.access.reports,microsoft.public.access
Dale Fye
external usenet poster
 
Posts: 2,651
Default Display "No details" if subreport has no records

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

  #2  
Old December 2nd, 2009, 04:23 PM posted to microsoft.public.access.reports,microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Display "No details" if subreport has no records

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

"Dale Fye" wrote in message
...
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



  #3  
Old December 2nd, 2009, 04:23 PM posted to microsoft.public.access.reports,microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Display "No details" if subreport has no records

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

"Dale Fye" wrote in message
...
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



  #4  
Old December 2nd, 2009, 04:23 PM posted to microsoft.public.access.reports,microsoft.public.access
Gina Whipp
external usenet poster
 
Posts: 3,500
Default Display "No details" if subreport has no records

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

"Dale Fye" wrote in message
...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:14 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.