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  

show/hide SubReport



 
 
Thread Tools Display Modes
  #1  
Old February 6th, 2006, 11:36 PM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default show/hide SubReport

Hi all,

Is it possible to have a subreport show/hide based on a checkbox selection?
I have a form with the following event:

Private Sub PercentRent_AfterUpdate()
'After Update of checkbox
'Check if Percentage Rent checkbox is selected
'then show or hide subform
If Me.PercentRent = True Then
Me.frmPercentRent.Visible = True
Else
Me.frmPercentRent.Visible = False
End If

Can I do something like this on the report?

Thanks
  #2  
Old February 7th, 2006, 01:03 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default show/hide SubReport

D. M. wrote:
Is it possible to have a subreport show/hide based on a checkbox selection?
I have a form with the following event:

Private Sub PercentRent_AfterUpdate()
'After Update of checkbox
'Check if Percentage Rent checkbox is selected
'then show or hide subform
If Me.PercentRent = True Then
Me.frmPercentRent.Visible = True
Else
Me.frmPercentRent.Visible = False
End If

Can I do something like this on the report?



No. Report's are static objects that do not support
interactive components the way forms do.

The usual usual thing to do is use a form for users to
select report options (such as your check box) and the set
the appropriate properties in the report's Open event:

Sub Report_Open( . . .
If Forms!theform.PercentRent = True Then
Me.frmPercentRent.Visible = True
Else
Me.frmPercentRent.Visible = False
End If
End Sub

--
Marsh
MVP [MS Access]
  #3  
Old February 7th, 2006, 10:17 AM posted to microsoft.public.access.reports
external usenet poster
 
Posts: n/a
Default show/hide SubReport

Thanks Marshall. It was a just a thought.

"Marshall Barton" wrote:

D. M. wrote:
Is it possible to have a subreport show/hide based on a checkbox selection?
I have a form with the following event:

Private Sub PercentRent_AfterUpdate()
'After Update of checkbox
'Check if Percentage Rent checkbox is selected
'then show or hide subform
If Me.PercentRent = True Then
Me.frmPercentRent.Visible = True
Else
Me.frmPercentRent.Visible = False
End If

Can I do something like this on the report?



No. Report's are static objects that do not support
interactive components the way forms do.

The usual usual thing to do is use a form for users to
select report options (such as your check box) and the set
the appropriate properties in the report's Open event:

Sub Report_Open( . . .
If Forms!theform.PercentRent = True Then
Me.frmPercentRent.Visible = True
Else
Me.frmPercentRent.Visible = False
End If
End Sub

--
Marsh
MVP [MS Access]

 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameterizing subreports Jack Setting Up & Running Reports 8 October 21st, 2005 12:00 PM
Report with subreport: one to many Lorirobin Setting Up & Running Reports 1 July 2nd, 2005 04:30 PM
repeating records in a subreport Paul James Setting Up & Running Reports 2 February 2nd, 2005 06:11 PM
SubReport No Data printing problem Tony_VBACoder Setting Up & Running Reports 1 August 9th, 2004 10:10 PM
Problems totalling subreport data on main report (A-2002) Marshall Barton Setting Up & Running Reports 0 June 23rd, 2004 08:01 PM


All times are GMT +1. The time now is 05:07 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.