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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |