Hi,
I have a number of combo boxes on a form and I want combo box 2 greyed out/deactivated until combo box 1 is filled in, can I do this?
Michael
Hi,
I have a number of combo boxes on a form and I want combo box 2 greyed out/deactivated until combo box 1 is filled in, can I do this?
Michael
You need two bits of VBA.
The first one greys out the second combo box on loading the form.Code:Private Sub Form_Load() cbo2.Enabled = False End Sub Private Sub cbo1_AfterUpdate() If Len(cbo1) <> 0 Then cbo2.Enabled = True Else cbo2.Enabled = False End If End Sub
The second one ungreys it if the first combo box contains data.
Thanks, that has worked a treat.
How do I mark this thread as solved?
Click on thread tools at the top of the posting and select Solved.