Remove a sub-form by a choice from a combo box

Ants

Registered User.
Local time
Today, 00:49
Joined
Aug 2, 2000
Messages
11
Within a form I have a combo box and a sub-form. If I choose a particular choice from the list available from the combo box, I do not want the sub-form to be visible. How do I go about it?

Shall look forward to any comments and advices!
 
on the AfterUpdate of your combobox when it equals the value that you want the Subform to not be visible set the SubForm Visible property to False. In this case you will need to add the code to make its visible property to True.

Private Sub MyCombo_AfterUpdate()
If Me.MyCombo="Dont Show Combo Value" then
Me.[Name of Subform Control].Visible=False
else
Me.[Name of Subform Control].Visible=true
end if

End Sub
 

Users who are viewing this thread

Back
Top Bottom