Peanut2232425
IS-IT--Management
This is how i have it written:
Private Sub Form_Current()
If Problem <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = False
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem2 <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem3 <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = True
Me.Problem5.Enabled = False
If Problem4 <> " " 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?
Private Sub Form_Current()
If Problem <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = False
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem2 <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = False
Me.Problem5.Enabled = False
If Problem3 <> " " Then
Me.Problem.Enabled = True
Me.Problem2.Enabled = True
Me.Problem3.Enabled = True
Me.Problem4.Enabled = True
Me.Problem5.Enabled = False
If Problem4 <> " " 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?