making a control visible based on another controls data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to keep a control hidden until a user chooses a certain
record from a drop down? I have a drop down with 10 values and only one
value requires additional data to be entered. I would like the following
control to remain hidden unless that one value is chosen. Can this be done
without VB? Thanks
 
Use the combobox's AfterUpdate event (and the form's OnCurrent event) to
evaluate the value and reveal or hide the other control:

If Me.Combo1 = SpecialValue Then
Me.OtherControl.Visible = True
Else
Me.OtherControl.Visible = False
End If

Also, start out with the control set to invisible (in form design mode) if
that's your default.
 
Thanks!! Works like a charm!

kingston via AccessMonster.com said:
Use the combobox's AfterUpdate event (and the form's OnCurrent event) to
evaluate the value and reveal or hide the other control:

If Me.Combo1 = SpecialValue Then
Me.OtherControl.Visible = True
Else
Me.OtherControl.Visible = False
End If

Also, start out with the control set to invisible (in form design mode) if
that's your default.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top