If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Setting text box visibility
I am trying to set the visibility of a text box according to the value
in a combo box. In other words, I would like for textbox1 to be visible when combobox1 value = 60, otherwise textbox1 should not be visible. Any help will be greatly appreciated. |
#2
|
|||
|
|||
Setting text box visibility
You will want this code in the After Update event of the combo box, as
well as the On Current event of the form i believe (if you need to set visibility when changing records) If Me.Combo1 = 60 Then Me.Text1.Visible = True Else Me.Text1.Visible = False End If |
#3
|
|||
|
|||
Setting text box visibility
On Oct 13, 4:31*pm, ghetto_banjo wrote:
You will want this code in the After Update event of the combo box, as well as the On Current event of the form i believe (if you need to set visibility when changing records) If Me.Combo1 = 60 Then * * *Me.Text1.Visible = True Else * * *Me.Text1.Visible = False End If Thanks. I found, accidentally, that putting this code only in the On Current event of the form works. If I want to evaluate several values for the same text box, would I need to have multiple IF statements? Also, the combo box can have values such as "84A, 84B, etc. Can I have a wildcard to show the textbox if the value contains any instance of a particular number? |
#4
|
|||
|
|||
Setting text box visibility
On Oct 22, 7:50*am, Justin wrote:
On Oct 13, 4:31*pm, ghetto_banjo wrote: You will want this code in the After Update event of the combo box, as well as the On Current event of the form i believe (if you need to set visibility when changing records) If Me.Combo1 = 60 Then * * *Me.Text1.Visible = True Else * * *Me.Text1.Visible = False End If Thanks. I found, accidentally, that putting this code only in the On Current event of the form works. If I want to evaluate several values for the same text box, would I need to have multiple IF statements? Also, the combo box can have values such as "84A, 84B, etc. Can I have a wildcard to show the textbox if the value contains any instance of a particular number? The combo box values are "text" as opposed to numbers. I didn't know if this would be an issue or not. Thanks again for you help and for any other help you can offer. |
Thread Tools | |
Display Modes | |
|
|