Field available only if...

  • Thread starter Thread starter Phillip Schmidt
  • Start date Start date
P

Phillip Schmidt

I need a little help to make the following happen:

I have a form "VLARF Request Form" that is feeding a
table "VLARFRequestForms". On the form, I want the
field "txtOfficialBusiness" to be shaded (or unavailable)
unless the combo box "lstReason" is equal to "Official
Business". If "lstReason" is equal to "Official Business"
then I want the fiels "txtOfficial Business" to be
available for typing.

Thanks for the help as I learn.

Phillip Schmidt
 
How does the combo box gets its value? When do you want to make the check
for its value? Need a bit more info, please about the form's setup and how
you're using it.
 
The combo box gets its value by selecting one of the 10
choices after inputting the Employee's name and date of
proposed abscence. I think it should check for the value
of "lstReason" right after the selection is made, as the
field "txtOfficialBusiness" would need to become
immediately available so that it could become the next
field in the order.

Let me know if I left anything else.

Thanks,

Phillip Schmidt
 
I suggest that you use the AfterUpdate event of the combo box then:

Private Sub cboBoxName_AfterUpdate()
Me.txtOfficialBusiness.Enabled = (Me.cboBoxName.Value = "lstReason")
End Sub
 
Back
Top