display "enter date"

tubar

Registered User.
Local time
Today, 12:21
Joined
Jul 13, 2006
Messages
190
im new...I was wondering if I could display "enter date" in my date text box on my form...when the user selects the text box, "enter date" disappears
 
i tried what you suggested...since my field is formatted for time it didn't like when I inputted text. any other suggestions
 
I would have thought "tag" would help in this instant, but it doesn't. Again what I am trying to do is instead of having a label next to my text box that says "enter date here", I want "enter date here" inside my text box...the message goes away when the user is inside the textbox. the textbox is formatted for date and time.

any other suggestions?
 
Something like this??
Code:
Private Sub dateControlName_GotFocus()
    If Len(Me.dateControlName & vbNullString) <> 0 Then
        Me.dateControlName.Format = "Short Date"
    End If
End Sub

Private Sub dateControlName_LostFocus()
    If Len(Me.dateControlName & vbNullString) = 0 Then
        Me.dateControlName.Format = ""
        Me.dateControlName = "Enter a date !"
    End If
End Sub
Change the dateControlName to match your design..
 
Another possibility: overlay a transparent text box with properties set so it doesn't permit data entry but whose value is blanked from the on click event of your date entry control. (Untested. Just based on an idea I read about somewhere.)

-Ron
 
The problem is the OP wants Date/Time format in a single field. That's why I suggested a Date field and a separate Time field, then you could concatenate them together if needed.
Am :confused: I read the thread again, I cannot seem to see the OP stating such a request.. Am I really loosing it today? :eek:
 
A simple solution is to enter @;"enter date" in the "format" property of the text box.
 

Users who are viewing this thread

Back
Top Bottom