Enabling fields from a combobox selection

johho0ha

Registered User.
Local time
Today, 14:12
Joined
Apr 9, 2007
Messages
10
I have a combobox with:

Both
Left
No
Right

Based on the choice of the user, the combobox will enable lots of fields for the user to continue to answer. My problem is that "Both", "Left" and "right" all enable the same fields and my code:

Private Sub Proc_iliac_afterupdate()
Select case me.Proc_iliac.value
Case "both"
For each Ctl in me.controls
if ctl.tag = "proc_iliac" then
ctl.enabled = True
End if
Next ctl
Case "left"
For each Ctl in me.controls
if ctl.tag = "proc_iliac" then
ctl.enabled = True
End if
Next ctl
Case "right"
For each Ctl in me.controls
if ctl.tag = "proc_iliac" then
ctl.enabled = True
End if
Next ctl
End select
End sub

Comes up as an error when I try to pick one of the combobox choices. Please help, I don't know what I am doing wrong.:confused:
 
Well, the code is exactly the same for each choice, so it's no surprise that it does the same thing. What's the error, and when do you get it?
 
Surprisingly I'm not getting the error and I am getting the code to do exactly what I wanted to do. Thanks for all your time anyways!
 

Users who are viewing this thread

Back
Top Bottom