Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code for Highlighting each field entered 1

Status
Not open for further replies.

Accesser

Technical User
Jun 3, 2002
44
US
Hey there,

I was wondering if there is a relatively simple code to highlight each field that is entered (tabbed to or clicked inside) in a form and its subforms.

I'm interested in making the background color of an active field light yellow or something.

Thanks much.
 
You could set the backcolor of the control to the highlighted color on the gotfocus event and then change the backcolor back to normal on the lostfocus event.
 
Thanks for the reply Jitter,

I suppose that would have to be done for each and every field. Would there be a way to globally program this for all the fields in all the forms?
 
And if you are using A2k or A2k2 then you have access to the Conditional Formatting facility.

In form design view, select the control you want to work on
In the Format menu, Conditional Formatting.. option
In the bottom left corner there is a combo box that will allow you to select 'Comtrol Has the Focus' and from there you can select the colour that you want the bacground to become.



'ope-that-'elps.

G LS
 
Live and learn - that's what these boards are all about. :)

Have a good weekend.

G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top