Invisible Fields

  • Thread starter Thread starter cjay85
  • Start date Start date
C

cjay85

I have a text field that I want to be hidden on my form until a
certain option is chosen on a drop down menu.

For example, if the drop down menu = Other I want the text field with
Other (Please State) to appear with it being invisible until then.

Any ideas??

Thanks

Chris
 
hi,

I have a text field that I want to be hidden on my form until a
certain option is chosen on a drop down menu.

For example, if the drop down menu = Other I want the text field with
Other (Please State) to appear with it being invisible until then.
Use the change event of your ComboBox, i assume it is named cmbCombo:

Private Sub cmbCombo_Change()

txtOther.Visible = (cmbCombo.Value = "Other")

End Sub



mfG
--> stefan <--
 
you can add the following code to the combobox control's AfterUpdate event,
as

If Me!ComboBoxName = "Other" Then
Me!TextboxName.Visible = True
Else
Me!TextboxName.Visible = False
Me!TextboxName = Null
End If

note that if "Other" is not the value in the bound column of the combobox
control, you'll need to refer to the appropriate column, as

ComboBoxName.Column(n)

replacing "n" with the index number of the column. read up on combo box
controls in Access Help for details.

you'll probably also need to put code in the form's Current event, as

Me!TextboxName.Visible = (Me!ComboboxName = "Other")

hth
 
Back
Top