Set Enabling Of Controls Based Off Combo Box

G

Guest

I have a single combo box with the following Values Coach Operator, Coach
Technician, Administrative Assistant, Director of Something Or Another (Stil
in Testing Phase) and I would like to set the enable/disable property for a
few other controls on the form - the code I have in place is
###################################################
Private Sub Title_AfterUpdate()
If Me.Title = "Coach Operator" Then
Me.Conviction_DUI.Enabled = True
Me.Conviction_DUI__Date.Enabled = True
Me.Conviction_DUI_Explain.Enabled = True
Me.Work_History.Enabled = True
Else
Me.Conviction_DUI.Enabled = False
Me.Conviction_DUI__Date.Enabled = False
Me.Conviction_DUI_Explain.Enabled = False
Me.Work_History.Enabled = False
End If
End Sub

The controls seem to be disbaling fine but they are ignoring the "coach
operator" criteria and are disabling any time the Title field is updated
-regardless of the value.
 
D

Douglas J. Steele

What's the bound field for the combobox? Try adding:

MsgBox "Title contains " & Me.Title

in your event, just to check it's set up properly.
 
G

Guest

The Message Box Returned Exactly What It Was Supposed to - But I switched it
to a List box ... Although in the end I would like to have a Combo box ...
also - on a side note - I also have a State Field that lists the
Abbreviations for the 50 states ... but when I press say "N" many times it
does not scroll through all the states with "N" for the first letter ... it
instead types a "N" in the field control .... how do I make this stop and
make my Combo Boxes "scrollable"
 

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