When moving to different text boxes on a form, I use a procedure to change the background color of the current text box. The default background color of the text boxes is white. When entering a text box, the background color changes to yellow. When exiting that text box, the background color changes back to white.
This is accomplished with a module -> basBackColor
Private Const conYellow = 10092543
Private Const conWhite = 16777215
Public Function BackgroundYellow()
Screen.ActiveControl.BackColor = conYellow
End Function
Public Function BackgroundWhite()
Screen.ActiveControl.BackColor = conWhite
End Function
For each text box, the property setting is:
– Property – – – – – – – – – – – Value
OnGotFocus ……….. =BackgroundYellow()
OnLostFocus ………. =BackgroundWhite()
NOTE: For the form “On Open” event, it needs to have a Me.SetFocus procedure.
When using this method on a continuous form, ALL of the records for the control change their background color. Is there a way to change the background color of JUST the individual record of the control where the cursor is located in a continuous form?
Thank you for any help.
RonM