This is basically the same question as "Click items in select box, and then display a text input." Except I am using MS Access. I want to display a text input field on a form when the user selects "other" from a combo box on the same form. How do I do this?
views:
28answers:
1
A:
Put something like this in the AfterUpdate event of the combo box
If me.cboMy_combo=”Other” then
Me.txtSome_test.Visible =true
Else
Me.txtSome_test.Visible =false
End if
Kevin Ross
2010-03-19 08:13:42
One line : Me.txtSome_test.Visible = (me.cboMy_combo=”Other”)
Remou
2010-03-19 10:33:33
Good shout on doing it one line, both will work it is down to style
Kevin Ross
2010-03-19 11:27:55
I would disagree on style. The original answer is more verbose than it needs to be. Your desired property setting is a Boolean (True or False) and you're doing a Boolean test that evaluates to exactly the value you want to set the property to. @Remou's solution is much less verbose and still quite simple to understand.
David-W-Fenton
2010-03-20 00:27:23
Excellent reduction!
djdilicious
2010-03-22 15:32:13