Change Textbox Color through "subclassing"?

hk1

Registered User.
Local time
Today, 15:23
Joined
Sep 1, 2009
Messages
121
Is there a simple way to have the background color change on a textbox when the user enters it and change back to default when he exits it?

The only solutions I've come up with so far mean that I have to call a sub or function on_enter and on_exit, or else use a form timer. Is there some way I can subclass the textbox control (or superclass it?) to give me this functionality?

HK
 
Have you looked at Format/Conditional Formatting (on the ribbon in 2007)?
 
Not much. I don't think that's what I want since some of our computers are still using older versions of Access.
 
Well, on the older versions you simply select the control and goto

Format - Conditional Formatting

and set it. It's really simple; Under Condition1 select "Field Has Focus" then select the formatting you want and hit OK.

You could do it in the GotFocus/LostFocus events, but only if you're using a Single View Form. You have to use Conditional Formatting for Datasheet or Conditional View Forms.
 
Conditional Formatting is available from 2000 forward.
 
OK, great. I'll check that out. All our machines do have 2000 or newer.
 

Users who are viewing this thread

Back
Top Bottom