Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hide a Subform based on Combo Box

Status
Not open for further replies.

ImASig

Technical User
Jul 24, 2000
20
US
I have a combo box on the main form with values (1,2,3,4). I want to only display a subform nested in the main form if the value of the combo box is 4. Here is the code I have on the afterupdate on the combo box.

If STATUS = "4" Then
ORDERS_subform1.Visible = True
Else
ORDERS_subform1.Visible = False
End If

End Sub

This works great but when I change records the subform's visibility is remains bound to the previous record and not the current records combo box.
 
Sorry,

I should have said:

Try putting the same code in the Form's On Current event as well.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top