greyed text in form text box

SoxPats83

Registered User.
Local time
Yesterday, 23:15
Joined
May 7, 2010
Messages
196
i am willing to bet there is a very simple solution to this problem. i have a text box that people will be entering information into, and prior to their clicking on it i was the text box too read something like "Enter Info Here" in a grey text that vanishes upon selecting the box. i'm sure there is a term for this and like i said before, probably a very simple solution.
 
Well ... never did this before but if it was a text box I could envision setting the default value to "Enter text here" and in the OnOpen event of a New Record setting the control background color to grey.

But then you would have to validate the control to ensure they put something in it or "Enter text here" would be stored.

Well ... or ... depending on version, use a label like an overlay and on the OnClick event of the label have it go invisible and set the focus to the control.

-dK
 
hmmm, that seems like a lot of hassle for what would ultimately be little reward. i appreciate the response, i was just hoping there would be something in the text box properties. thanks though.
 
Could you not use the ON FOCUS event of the text box to wipe it out and change the color?
 
The only reason I didn't suggest that was if the record was completed, the box would still be grey ... so suggested the coloring happen on the OnOpen event (If Me.NewRecord Then Me.txtControl.BackColor = .... ).

I think perhaps the 3 step process seemed to much of a hassle.

Now, if someone were to create another class or do some overloading .... :rolleyes:

-dK
 

Users who are viewing this thread

Back
Top Bottom