Subforms visible/invisible based on option group selection

vangogh228

Registered User.
Local time
Today, 13:10
Joined
Apr 19, 2002
Messages
302
I have five continuous-form subforms that I would like to set to invisible, but make visible based on an option group selection on the main form. If option 1 is selected, I want to see subform1, etc... and then be able to make the subform invisible with, perhaps, a subform button click so that I can see the entire main form again.

I have used visible/invisible on controls many times, but not subforms. I have tried every possible permutation of syntax that I can think of, but am obviously missing something because I cannot get this to work. A search on this forum gives many threads with the keywords, but none I found address this issue.

Any help is GREATLY appreciated.

Tom
 
Answered.

Found the answer, quite by accident. Here's the first pass of code that makes it work:

Private Sub Frame42_AfterUpdate()

If Frame42.Value = 1 Then
Me.PrincipalsInfoQuerysubform.Visible = True
Else
Me.PrincipalsInfoQuerysubform.Visible = False
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom