Combo box remains enabled

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top