David Mack
Registered User.
- Local time
- Today, 00:56
- Joined
- Jan 4, 2000
- Messages
- 53
Hello all!
I have a form with 58 question option boxes. I test whether the data entry person has filled out all the required information in the form header prior to allowing them to answer the questions.
If the required info is not entered, I want to disable the question controls. If completed, then enable the controls. The controls are named: [1], [2], ... , [58]
I figured a loop would work. Initially I tried:
Dim I As Integer
For I = 1 to 58 Step 1
Me!.enabled = False
Next I
If I hard code Me![1].enabled = False, the first control is disabled. I then tried to create the string:
Dim strControl As String
Dim I As Integer
For I = 1 to 58 Step 1
strControl = "Me![" & I & "].Enabled =False"
Debug.Print strControl
Next I
The results in the debug window look fine.
1) How could I either pass the "I" variable into the Me! statement, or how could I execute the string I created?
Dave
[This message has been edited by David Mack (edited 11-15-2000).]
I have a form with 58 question option boxes. I test whether the data entry person has filled out all the required information in the form header prior to allowing them to answer the questions.
If the required info is not entered, I want to disable the question controls. If completed, then enable the controls. The controls are named: [1], [2], ... , [58]
I figured a loop would work. Initially I tried:
Dim I As Integer
For I = 1 to 58 Step 1
Me!.enabled = False
Next I
If I hard code Me![1].enabled = False, the first control is disabled. I then tried to create the string:
Dim strControl As String
Dim I As Integer
For I = 1 to 58 Step 1
strControl = "Me![" & I & "].Enabled =False"
Debug.Print strControl
Next I
The results in the debug window look fine.
1) How could I either pass the "I" variable into the Me! statement, or how could I execute the string I created?
Dave
[This message has been edited by David Mack (edited 11-15-2000).]