views:

28

answers:

1

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?

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
One line : Me.txtSome_test.Visible = (me.cboMy_combo=”Other”)
Remou
Good shout on doing it one line, both will work it is down to style
Kevin Ross
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
Excellent reduction!
djdilicious