I have an unbound "Single Form"
data entry form, and wanted to highlight the current field to make data entry
easier. There are several numeric fields, and when the user tabs into those
fields it's hard to tell where you are, because the cursor is a blinking
vertical line which aligns right in the field. I had seen this feature in the
UPS WorldTrack software years ago, but didn't realize how easy it is to
implement in Access.
I have a sub in the code-behind for the form:
Private Sub Highlight()
On Error Resume Next
Me.ActiveControl.BackColor = vbYellow
Screen.PreviousControl.BackColor = vbWhite
and then I add the GotFocus event to every control on the form that is Enabled; like this:
Private Sub txtFees_GotFocus()
You just have to make sure that the BackStyle property is set to Normal, not Transparent.