Making test box visible

  • Thread starter Thread starter Sevi
  • Start date Start date
S

Sevi

Hi,

I'm using a form to enter data in a table, where in there is combo box. If
i select a purticular value (WIP) in the combo then a related text box has to
be visible. In all other cases the text box has to be invisible. how to do
it, can anyone please help.

Smiles, Sevi
 
Hi Sevi,

something like-->

If Len(Me.NameOfCombo) >0 Then
If Me.NameOfCombo = "WIP" Then
Me.NameOfTextbox.Visible = True
Else
Me.NameOfTextbox.Visible = False
End If
End If

The above code goes in the After update event for the combo
Replace NameOfCombo and NameOfTextbox with the real names.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
Hi Sevi,

something like-->

If Len(Me.NameOfCombo) >0 Then
If Me.NameOfCombo = "WIP" Then
Me.NameOfTextbox.Visible = True
Else
Me.NameOfTextbox.Visible = False
End If
End If

The above code goes in the After update event for the combo
Replace NameOfCombo and NameOfTextbox with the real names.

Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

You may also want to put the same code in the form's Current event to make the
textbox (in)visible when you navigate to a different record.
 
Hi John,

Wonderful solutions...it's working well

Yet I have one problem. While data entry, text is geting visible/invisible
according to value selected in the combo, but while scrolling through the
records in the form, even for those records where combo value "WIP" the text
box is not geting visible.

pls help me.

Smiles, Sevi
 
Hi John,

Wonderful solutions...it's working well

Yet I have one problem. While data entry, text is geting visible/invisible
according to value selected in the combo, but while scrolling through the
records in the form, even for those records where combo value "WIP" the text
box is not geting visible.

If it's a Single view form you need to put Jeanette's code in the Current
event *as well as* the combo's afterupdate.

If it's a Continuous Form you'll need to use Conditional Formatting instead.
 
Back
Top