I think the post means that on a form, when the cursor is in the key field, to have that text box change color.
This is very easy. I use a function to change the border color around text boxes as they get the focus, to help the eye see where the cursor is. I start with a 1 or 2 pt white border around a blue background with white text. When the field has the focus, I change the border color to RED. When it loses focus, I change it back to White.
You could easily do the same thing for the BACKGROUND, just remember to set it back to the 'standard' color, and also be careful of changing the text color too... I guess it would depend on WHAT colors your client wanted. Here's the functions I use - just tie them to the ON GOT FOCUS and ON LOST FOCUS events of any control you want:
Code:
Function ResetBorderColor()
On Error Resume Next
Screen.ActiveControl.BorderColor = vbBLACK
End Function
Function ResetBorderWhite()
On Error Resume Next
Screen.ActiveControl.BorderColor = vbWhite
End Function
Function SetBorderColor()
On Error Resume Next
Screen.ActiveControl.BorderColor = vbRED
End Function
For example, start with a border color of white. On a field, in the property sheet, set its' GOT FOCUS event to
=SetBorderColor()
Set it's LOST FOCUS event to
=ResetBorderWhite()
Feel free to mix and match whatever colors you want...
Jim