Can someone please help me figure out the correct syntax for this module. I've been struggling with it for the past hour an it's about to drive me crazy.
I have the following Subroutine defined in my form...
And I'm calling it from another subroutine in the same form like so..
ControlDisable (Me.Controls("AdjName"
)
However, I keep receiving an error 424 "Object required".
AdjName is the name of a textbox on this form, so I know that isn't the problem.
Any ideas?
Maq![[americanflag] [americanflag] [americanflag]](/data/assets/smilies/americanflag.gif)
<insert witty signature here>
I have the following Subroutine defined in my form...
Code:
Private Sub ControlDisable(ctl As TextBox)
ctl.Locked = True
ctl.Enabled = False
ctl.SpecialEffect = 0 'flat
ctl.BackStyle = 0 'transparent
ctl.BorderStyle = 0 'transparent
End Sub
And I'm calling it from another subroutine in the same form like so..
ControlDisable (Me.Controls("AdjName"
However, I keep receiving an error 424 "Object required".
AdjName is the name of a textbox on this form, so I know that isn't the problem.
Any ideas?
Maq
![[americanflag] [americanflag] [americanflag]](/data/assets/smilies/americanflag.gif)
<insert witty signature here>