A
Andy Roberts
I have two combos the first shows companies and the second filters to show
employees based on the selection from the first combo.
I want the second combo to be disabled until a selection is made in the
first combo and I have it disabled using the on_load event for the form and
the following code in the after update event of the first combo
Private Sub cboClientID_AfterUpdate()
If Me.cboClientID = Null Then
Me.cboClientRepID.Enabled = False
Else
Me.cboClientRepID.Enabled = True
End If
Me.cboClientRepID.Requery
End Sub
The problem is that if I delete everything in the first combo (i.e. make it
blank then I would have thought the "else" section would have disabled the
second combo again but it dosesn't. How can I tweak the above code to
disable the 2nd combo if I clear the value in the first?
--
Regards
Andy
___________
Andy Roberts
Win XP Pro
Access 2007
Liverpool, UK
employees based on the selection from the first combo.
I want the second combo to be disabled until a selection is made in the
first combo and I have it disabled using the on_load event for the form and
the following code in the after update event of the first combo
Private Sub cboClientID_AfterUpdate()
If Me.cboClientID = Null Then
Me.cboClientRepID.Enabled = False
Else
Me.cboClientRepID.Enabled = True
End If
Me.cboClientRepID.Requery
End Sub
The problem is that if I delete everything in the first combo (i.e. make it
blank then I would have thought the "else" section would have disabled the
second combo again but it dosesn't. How can I tweak the above code to
disable the 2nd combo if I clear the value in the first?
--
Regards
Andy
___________
Andy Roberts
Win XP Pro
Access 2007
Liverpool, UK