Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having troubles with drop down boxes being automatic 1

Status
Not open for further replies.

Peanut2232425

IS-IT--Management
Feb 14, 2001
14
0
0
US
This is how i have it written:

Private Sub Form_Current()
If Problem <> &quot; &quot; Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = False
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem2 <> &quot; &quot; Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem3 <> &quot; &quot; Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = True
Me.Problem5.Enabled = False
If Problem4 <> &quot; &quot; Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = True
Me.Problem5.Enabled = True
Else
Me.Problem.Enabled = True
Me.Problem2.Enabled = False
Me.Problem3.Enabled = False
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
End If
End If
End If
End If
End Sub

The effect I was is that when the 1st drop menu box is chosen then the second enables. Then if the second one is chosen the third one enables & so on. What am i doing wrong?
 
I think you man a combo box, to enable Combo box Number 2, after something has been chosen in combo box no 1 then the code would be place into the afterupdate event of combo box1

sub ProblemAfterUpdate()
if trim(&quot; &quot; & Problem)<> &quot;&quot; then
Problem2.enabled = true
end if
end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top