example greyed out text in textbox?

optionone

Registered User.
Local time
Today, 12:39
Joined
Feb 11, 2010
Messages
56
Hi,

Tried searching this forum and the web for an answer to this but not sure what exactly to search for to find an answer

What I am hoping to do is to put some text in a text box that would help the user inputting the data in a similar fashion that a search site would have a text box that might say 'enter search parameters' here - which would disappear once clicked on

Is this too complicated?

Thanks! :)
 
In the form's On Current Event you could put the following;
Code:
    If Me.NewRecord = True Then
        Me.YourFieldName = "Enter Value Here"
    End If
Then in the Form's Before Update event put the following;
Code:
If Me.YourFieldName = "Enter Value Here" Then
     MsgBox "Please enter a value"
     Me.YourFieldName.SetFocus
     Cancel = True
End If
 
Last edited:
You could then use Conditional Formatting to format the text "Enter Value Here"
to appear greyed out.
 
...Oh yes, almost forgot to mention that the code presented above will only work for text or memo fields, numeric fields will require a different approach.
 

Users who are viewing this thread

Back
Top Bottom