Hello all.
Depending on the logged used I would like to disable every textbox and combobox on a form using VBA. I know that I can use the following code to move through the Control Collection:
Dim ctr As Control
For Each ctr In Me.Controls
DO SOMETHING HERE
Next ctr
'
Me.Refresh
However, the form obviously has other controls (i.e. Labels) that do not have an ENABLE property.
Is there a way to check what type of control each is and only disable the appropriate one?
Thanks in advance,
Sean
Depending on the logged used I would like to disable every textbox and combobox on a form using VBA. I know that I can use the following code to move through the Control Collection:
Dim ctr As Control
For Each ctr In Me.Controls
DO SOMETHING HERE
Next ctr
'
Me.Refresh
However, the form obviously has other controls (i.e. Labels) that do not have an ENABLE property.
Is there a way to check what type of control each is and only disable the appropriate one?
Thanks in advance,
Sean