Date on Double Click

Harry Taylor

Registered User.
Local time
Today, 06:59
Joined
Jul 10, 2012
Messages
91
Hi,

I' trying to add todays date to a field on double click.

I've tried the =Now() function, which works, but also gives me the time.

What is the function to show the date without time.

Thanks in advance :)
 
That's what I thought, but I get a Syntax Error.

1708429430128.png
 
Me.date = date()
 
Thanks MajP.
I think this is the source of the problem.

Appreciate your help
 
Just to make sure. The reserved word issue is a problem, but not the cause of your problem.
In a calculated control you can set the control source to
=Date()
but in vba you have to set it equal to someting.
SomeField_orControlName = Date()

With reserved words when you use them in SQL they have to have [] around them.
 
it is No problem if you both qualify your control and the function:

Me.Date = VBA.Date
 
Plus your syntax was for when you want the Date as a control source?
 

Users who are viewing this thread

Back
Top Bottom