Changing Tab-thru to Colour

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
 
G

Graham R Seach

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top