Default, disapering text. (1 Viewer)

Thales750

Formerly Jsanders
Local time
Today, 00:41
Joined
Dec 20, 2007
Messages
2,104
Sorry for not finding this on Google,

Could anyone tell me where to find a routine that shows a descriptive value in a null text box, but once the text box gets focus it goes blank.

Example: Data Entry Form

ON Open or New Data, text box displays Address. On Get Focus, On Enter, or on some other event, the text box would become blank and be ready to receive typed input.

An advanced feature would be to redisplay the original text on removing any typed text.


Thanks for pointing me in the right direction
 

Minty

AWF VIP
Local time
Today, 05:41
Joined
Jul 26, 2013
Messages
10,371
There is no simple way to do this in Access a that I know of.
The nearest thing I have seen is a cunning use of unbound text boxes or labels that are placed over the "real" controls for the fields, when you click in the "Address" box it loses focus and is hidden behind the real textbox for the control. If a value is set then the textbox remains on top and hides the label, if not it is re-hidden behind the label.

The other route may be to Highlight / colour change the label or textbox on focus.
Allen Browne describes this here http://allenbrowne.com/highlight.html
 

CJ_London

Super Moderator
Staff member
Local time
Today, 05:41
Joined
Feb 19, 2013
Messages
16,610
I meant to say you can also combine with conditional formatting to provide a different background for null values and a wider number of options for foreground color. Rule would be Field Value Is...Equal to...Null
 

Thales750

Formerly Jsanders
Local time
Today, 00:41
Joined
Dec 20, 2007
Messages
2,104
Thanks Guys.

I did it once before on an unbound Text Box, maybe using On Change and then when "Saving" the form information the code looked for the default text.

When I get around to getting it done, I will post it here.
 

Users who are viewing this thread

Top Bottom