I have a form that has 4 checkbox controls on it. I want these to be an On/Off switch for subforms in a report named "rptMainReferralForm". I'm pretty sure I have the basics down. Do i need to add a subform control on the report and set the visibility to False? Then when the checkboxes are checked set the visibility to true and set to force a new page? Also what is the syntax of setting the visibility property for a form. I keep tinkering around with it and am not getting the results I want haha.
Thanks,
Rick
Thanks,
Rick
Code:
Private Sub cmdOpenReport_Click()
Dim sn As Boolean
Dim cs As Boolean
Dim cg As Boolean
Dim supp As Boolean
sn = Me.chkSelfNeglect.Value
cs = Me.chkChoices.Value
cg = Me.chkCaregiver.Value
supp = Me.chkSuppNotes.Value
If sn = True Then
End If
If cs = True Then
End If
If cg = True Then
End If
If supp = True Then
End If
Me.Combo7.SetFocus
DoCmd.OpenReport "rptMainReferralForm", acViewPreview
End Sub