G
gakersm
Guest
I know there are a lot of threads regarding visible subreports but I can't seem to make use of the coding.
I have a form with an option group that brings up 1 of 2 subforms. I managed to figure out how to code that correctly from this forum. Now I need to accomplish the same thing with a report/subreports generated from the form. However, I can't seem to transfer the coding from the form over to the report and get it to work. I am a complete beginner with VB so I'm sure that I have syntax problems. Could someone please help me with this?
Here is what I have tried...
Private Sub Meeting_Agenda_RPT_OnOpen(Cancel As Integer)
If Meeting_Type = 1 Then
Me.Mtg_Subreport.Visible = True
Else: Me.Mtg_Subreport.Visible = False
End If
If Meeting_Type = 2 Then
Me.CC_Subreport.Visible = True
Else: Me.CC_Subreport.Visible = False
End If
End Sub
I have a form with an option group that brings up 1 of 2 subforms. I managed to figure out how to code that correctly from this forum. Now I need to accomplish the same thing with a report/subreports generated from the form. However, I can't seem to transfer the coding from the form over to the report and get it to work. I am a complete beginner with VB so I'm sure that I have syntax problems. Could someone please help me with this?
Here is what I have tried...
Private Sub Meeting_Agenda_RPT_OnOpen(Cancel As Integer)
If Meeting_Type = 1 Then
Me.Mtg_Subreport.Visible = True
Else: Me.Mtg_Subreport.Visible = False
End If
If Meeting_Type = 2 Then
Me.CC_Subreport.Visible = True
Else: Me.CC_Subreport.Visible = False
End If
End Sub