Formatting all text boxes on a form

maviko

Registered User.
Local time
Today, 05:53
Joined
Feb 29, 2004
Messages
14
I would like to format all text boxes on a form. If there is an entry, I would like the backcolor to be white, else if not, red. Can I do that in the form code level, or would I have to do it for each text box separately?
 
You can do it in the current event of the form by looping through the fields collection and if the control is a textbox checking its value property and setting the background appropriately. But if you want the background to change as the user tabs though the form and changes things, you'll need code in the AfterUpdate event of each control.
 

Users who are viewing this thread

Back
Top Bottom