automatically Add date on doubleclick

  • Thread starter Thread starter Maggie
  • Start date Start date
M

Maggie

I have a form that has a field [lastupdated] I would like
the users to be able to doubleclick on that field and
today's date would populate.

Any ideas on how to do this. Right now they add the date
by ctrl+;

Thanks,

Maggie
 
Put the following code in that field's double click event:

Me!NameOfTheField = Date()
 
-----Original Message-----
I have a form that has a field [lastupdated] I would like
the users to be able to doubleclick on that field and
today's date would populate.

Any ideas on how to do this. Right now they add the date
by ctrl+;

Thanks,

Maggie
.
Hi Maggie,

use the following as an example.

' first check for existing value to avoid overwriting
If Not IsDate(txtThisControlName) Then
txtThisControlName=Date()
End IF

You could also use this OnEnter or have the control
default value =Date()

Luck
Jonathan
 
It worked! Thanks Maggie
-----Original Message-----
Put the following code in that field's double click event:

Me!NameOfTheField = Date()

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
(e-mail address removed)
www.pcdatasheet.com


I have a form that has a field [lastupdated] I would like
the users to be able to doubleclick on that field and
today's date would populate.

Any ideas on how to do this. Right now they add the date
by ctrl+;

Thanks,

Maggie


.
 
Back
Top