Changing Tab-thru to Colour

  • Thread starter Thread starter IreneJ
  • Start date Start date
I

IreneJ

Hello,

As our staff tab through a screen while doing entry I
would like the fields to be highlighted or coloured so
that they can see which field they are on.

Can anyone explain how I add this feature to a form.

Thanks very much,

Irene
 
Irene,

This might be the simplest way.

1. Create the following two functions in a standard module.
Public Function HiLightCtrl()
Screen.ActiveControl.BackColor = vbYellow
End Function

Public Function ResetCtrlColor()
Screen.ActiveControl.BackColor = vbWhite
End Function

2. Add the following to the appropriate controls' On Enter property:
=HiLiteCtrl()

3. Add the following to the appropriate controls' On Exit property:
=ResetCtrlColor()

That's it!

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Microsoft Access 2003 VBA Programmer's Reference
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0764559036.html
 
Back
Top