Log in

View Full Version : Hiding controls on a form


rjpohl
Jan 10, 2004, 12:41 PM
I woould like thide 1 contol on a form based on the info in another form. The contol with the info is "action" and it can have the following 3 inputs 1. Sell 2 Buy and 3 No Sell. If BUY is selected I want to hide the control txtadjustedfinalprice.

I tried the following code under the current event for the form but it didn't work

If Me!Action = "buy" Then
Me.txtadjustedfinalprice.Visible = True
Else
Me.txtadjustedfinalprice.Visible = False
End if

am I using good code, am I using the right event? The user could change the "action" from Buy to Sell or No sell while form is open and I would need "txtadjustedfinalPrice" to react .

thanks for your help, Bob