Can a control be displayed based on a selection?

LDeBlois

New member
Local time
Today, 20:30
Joined
Dec 19, 2001
Messages
6
I have a field on my form which allows the user to select "Yes" or "No". Is there a way to have a "Comments" box appear if the user selects "No"?
 
Pre draw the comments box and set it's visible & enabled properties to false. When the use selects no, enable the visible & enabled properties.

txtComments.Enabled = True
txtComments.Visble = True
 
Thanks for the reply.

I saw the code you gave me, but I don't know where to put it or how to tell it to display the comment box only when NO is selected.

Can you help a little more?
 
Private Sub Combo2_Click()
If Combo2 = "No" Then
Text0.Visible = True
Text0.Enabled = True
Else
Text0.Visible = False
Text0.Enabled = False
End If
End Sub
 
Also place this code or call it in the Form's Current event (I prefer to code it in the Current event and just put Call Form_Current in the Click event, but that's me).
 

Users who are viewing this thread

Back
Top Bottom