When Double Clicked Enters Todays Date

moagli

Registered User.
Local time
Today, 07:47
Joined
Nov 17, 2006
Messages
15
I have a sub form that contains a text box with an input mask on it, and when i entered the following code on the text boxes dbl click command it didn't work is there something simple that i'm missing? The text box is called date, and the input mask is the following:00/00/00;0;_

Thanks in advance.

Private Sub Date_DblClick(Cancel As Integer)
Me.Date.Text = Date
End Sub
 
that was what i tried first but for some reason it doesn't work is it becasue there is an imput mask on the text box? or am i doing something else wrong??
 
it is never a good idea to name a form object the same as a built in function...

I would recommend changing the text box name to txtDate, and then using:
Me.txtDate = Date()
 
DO NOT USE THE SYSTEM name Date for the control, change it to txtDate

then Me.txtDate=Date

Brian

Damn Bodi beat me
 

Users who are viewing this thread

Back
Top Bottom