Grey-out/Enable field.

  • Thread starter Thread starter Phil
  • Start date Start date
P

Phil

Hello,

I have created a form for tracking things. I inserted a
drop-down box that offers four options from a value list
(no-one, everyone, group, individual). Alongside and to
the right of that box are two other boxes (- - -). The
first box is for a group-name, and the second is for an
individual's name. I would like both to be greyed out
(disabled) unless the following happens:

If they choose Group, then the "group" box should be
enabled.
If they choose Individual, then the "individual" box
should be enabled.

How do I pull this off?

Kindest regards,

Phil
 
In the first combo box, use the AfterUpdate event to change the Enabled
status of the other two boxes.

Example:
Me.cboCombo2.Enabled = (Me.cboCombo1 = "Group")
Me.cboCombo3.Enabled = (Me.cboCombo1 = "Person")

The part in the parentheses will evaluate to True or False and pass that
value to the Enabled property of the other two combo boxes. If the column
with the word Group and Person isn't the Bound Column, you'll need to change
the above by replacing the word with the associated value in the Bound
Column or use the Column property of the first combo box to get the text.
 
Back
Top