Combo box remains enabled

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

Guest

On a form I have sevditeral combo boxes which are enabled or not based upon
the data entered into a prior combo box. This works well for new records but
when editing data for records which have already been entered, if a
particular combo box is enabled in one record, when I move to a subsequent
(not new) record, the combo box remains inappropriately enabled. (i.e. it
remains enabled even if the data in the associated combo box in a new record
would have event code to disenable the second box).
So, what event procedure can I utilize to maintain prior enabled status of
comboboxes as the record pointer is moved from one record to another. In
other words, if the original data disenabled a combobox, which event upon
activating that record for editing, will keep all of the combo boxes in their
prior status.
 
Check the contents of the "condition" combo box in the Current event of the
form:

Form_Current()
If txtA = 3 Then 'text box example
txtB.Enabled = False
Else
txtB.Enabled = True
End If
If CheckA Then 'checkbox example
txtC.Enabled = False
Else
txtC.Enabled = True
End If

End Sub
 
Back
Top