G
Guest
Hi,
I have a form with fields that change color on gotfocus using:
Private Sub txtCertNo_GotFocus()
Screen.ActiveControl.BackColor = RGB(0, 255, 255)
End Sub
This works great, except when the form is closed, then opened again. A
runtime error msg 2474 states, "The expression requires the control to be in
the active window. The debug info takes me to the 2nd line of the above code.
This field is #1 in the tab order, so the cursor is there when I end the
debugging process.
Any ideas? Thanks, in advance for your help!
Karl
I have a form with fields that change color on gotfocus using:
Private Sub txtCertNo_GotFocus()
Screen.ActiveControl.BackColor = RGB(0, 255, 255)
End Sub
This works great, except when the form is closed, then opened again. A
runtime error msg 2474 states, "The expression requires the control to be in
the active window. The debug info takes me to the 2nd line of the above code.
This field is #1 in the tab order, so the cursor is there when I end the
debugging process.
Any ideas? Thanks, in advance for your help!
Karl