L
.Len B
I have a form with an option box containing 8 options for filtering
purposes.
Option Value 1 represents All
Option Value 2 represents Manager
Option Value 3 represents Keyworker etc.
The controls are named thus -
optRole1 lblRole1
optRole2 lblRole2 etc
Can I somehow change the names to
optRole(1) lblRole(1)
optRole(2) lblRole(2) etc
so that I can replace code like this
If mablnRoleActive(3) Then
lblRole3.BackColor = malngRoleBakGnd(3)
lblRole3.Caption = mastrRoleCaption(3)
Else
lblRole3.Visible = False
optRole3.Visible = False
End If
with a For / Next loop. In other words I want to change the left side of
the assignments to lblRole(x).property = ma...
purposes.
Option Value 1 represents All
Option Value 2 represents Manager
Option Value 3 represents Keyworker etc.
The controls are named thus -
optRole1 lblRole1
optRole2 lblRole2 etc
Can I somehow change the names to
optRole(1) lblRole(1)
optRole(2) lblRole(2) etc
so that I can replace code like this
If mablnRoleActive(3) Then
lblRole3.BackColor = malngRoleBakGnd(3)
lblRole3.Caption = mastrRoleCaption(3)
Else
lblRole3.Visible = False
optRole3.Visible = False
End If
with a For / Next loop. In other words I want to change the left side of
the assignments to lblRole(x).property = ma...