E
Eddy
I a trying to call the following function on the After Update event of a
control. The function code is:
Function ShadeCtls(txt As TextBox)
Dim ctlName As TextBox
Set ctlName = txt
If IsNull(ctlName) Or ctlName = 0 Then
ctlName.BackColor = 16777215
Else: ctlName.BackColor = 8454143
End If
End Function
I am having trouble in the event procedure for the control. I try to call
the Function using: ShadeCtls(Field1) Where Field1 is the field name and
I get an Object Required error. I have also tried putting the field name in
quotes which produced a type mismatch error.
How can I carry over the ctl name so it can be used in the Function?
Thanks once again.
control. The function code is:
Function ShadeCtls(txt As TextBox)
Dim ctlName As TextBox
Set ctlName = txt
If IsNull(ctlName) Or ctlName = 0 Then
ctlName.BackColor = 16777215
Else: ctlName.BackColor = 8454143
End If
End Function
I am having trouble in the event procedure for the control. I try to call
the Function using: ShadeCtls(Field1) Where Field1 is the field name and
I get an Object Required error. I have also tried putting the field name in
quotes which produced a type mismatch error.
How can I carry over the ctl name so it can be used in the Function?
Thanks once again.