G
Guest
In a data entry subform, I would like to set the Enabled property of 14
controls (DayHours1, DayHours2, ...DayHours14) by the value of their
associated Status property (Status1, Status2, ...Status14) with a loop. The
code below generates error 438: "Object does not support this property or
method". Can anyone help?
Private Sub Form_Current()
Dim i As Integer
' Set Enabled properties based on value of Status fields
For i = 1 To 14
Select Case Me("Status" & i)
Case 1
Me("DayHours" & i).Enabled = True
Case 2, 3
Me("DayHours" & i).Enabled = False
End Select
Next i
End Sub
controls (DayHours1, DayHours2, ...DayHours14) by the value of their
associated Status property (Status1, Status2, ...Status14) with a loop. The
code below generates error 438: "Object does not support this property or
method". Can anyone help?
Private Sub Form_Current()
Dim i As Integer
' Set Enabled properties based on value of Status fields
For i = 1 To 14
Select Case Me("Status" & i)
Case 1
Me("DayHours" & i).Enabled = True
Case 2, 3
Me("DayHours" & i).Enabled = False
End Select
Next i
End Sub