Lebel in the textbox

naungsai

Abecedarian
Local time
Today, 21:47
Joined
Sep 8, 2008
Messages
123
Dear friends

In stead of putting the label aside the text box, I want to make the label appear in the text box before I enter the data into it. :p

Moreover, I like the appearance of the label in dim contrast.

Thanks in advance.
 
Dear friends

In stead of putting the label aside the text box, I want to make the label appear in the text box before I enter the data into it. :p
 
Hide the label and put the text you want to see in the default value. Be aware though that the default value willl be entered in the database if it is not replaced, unless the field is numeric, in which case you will get an error on save (which in this case may be a good thing).

Chris B
 
Thanks for reply. :D
In the form I do have numeric fields.
I also don't want to save these default value as sometimes I may leave it blank.
 
Assuming the underlying field isn't defined as Numeric, you could set the Default Value as the textbox label, and use Conditional Formatting to set it to look as you wish, when its value equals the label's caption.
 
OK. Another thought which might work. Create an unbound text box to use as the label with the control source set to ="some text". Place it directly over the text box where data entry is to occur. Use it's on click event to set it invisible and to move the focus to the entry text box. Set the lost focus on the entry text box to make the label text box visible again. Bit of work, but should be a fun effect.

Chris B
 
You could even change the text to indicate that an entry had occurred, either by displaying the actual value of the entry or by changing the text to "Completed" or whatever - =IIf ( IsNull (text1) , "No Entry yet", "Completed") or =IIf ( IsNull (text1) , "No Entry yet", [text1]).

Chris B
 
Last edited:

Users who are viewing this thread

Back
Top Bottom