0
Private Sub Combo1_Change()

With Me.Combo2.Enabled = False

Select Case Me.Combo1
   Case "bob"
    Me.Combo2.Enabled = True
   Case "carol"
    Me.Combo2.Enabled = True
   Case "jeff"
    Me.Combo2.Enabled = False
    Case "freeda"
    Me.Combo2.Enabled = false

   Else: Combo2.Enabled = False

End Select

End Sub

Hi all , this code seems to be wrong as i cannot get the combo2 to become disabled as a result of choosing a value in combo1.
Any help would be appreciated very very very very muchly, with thanks
gruffy
This bit of code is not the real code i want to successfully instigate, but a simpler example to help m understand the premise etc....
(i mean i have more than these two in my program but need to understand the correct approach, so that i may apply it to all areas in program that require tis type of validatio or whatever it needs)
Thanks agian all peeps out there

Edited by gruffy321: n/a

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by gruffy321
1

Change combo box Event from Combo1_Change() to Combo1_Click() :

Private Sub Combo1_Click()
Select Case Me.Combo1
    Case "bob"
        Me.Combo2.Enabled = True
    Case "carol"
        Me.Combo2.Enabled = True
    Case "jeff"
        Me.Combo2.Enabled = False
    Case "freeda"
        Me.Combo2.Enabled = False
    Case Else ' this for case else
        Me.Combo2.Enabled = False
End Select
End Sub

Edited by Jx_Man: n/a

0

Amazing, thankyou Jx_Man you sorted it right out, bloody obvious i guess, but sometimes teh simplest stuff escapes when your a bit tired (or in my case...Stupid !)
Thanks again Jx_Man, you rule !
Gruffy

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.