UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

 
   Reply to this topicStart new topic
> Automatic Date Entry, Office 2007    
 
   
RobertJohn
post May 18 2010, 05:43 AM
Post#1



Posts: 37
Joined: 13-February 08



Hi all
I am using Access 2007
I have a Date/Time field (Edit_Date) on a form. I would like to have Today’s date entered as soon as I click in the field.

I tried :
Dim Edit_Date
Edit_Date = Date (I also tried Edit_Date = Today)
In both cases this set up the Date Picker which then involved a couple of clicks to actually enter Today’s date.
Is there a way to have the date entered directly without going through the date picker?
Thanks
Robert
Go to the top of the page
 
Peter46
post May 18 2010, 05:50 AM
Post#2


UtterAccess VIP
Posts: 7,489
Joined: 3-October 05
From: Oadby Leics, UK


Why not set the default value of the textbox or the field to today's date.
=Date()
Go to the top of the page
 
Gustav
post May 18 2010, 11:05 AM
Post#3


UtterAccess VIP
Posts: 2,163
Joined: 21-February 07



At the OnEnter event this should do it:
If IsNull(Me!Edit_Date.Value) Then
Me!Edit_Date.Value = Date
End If
If the date picker pops up, remove that feature in the property sheet of the textbox.
/gustav
Go to the top of the page
 
RobertJohn
post May 18 2010, 11:54 AM
Post#4



Posts: 37
Joined: 13-February 08



Gustav and Peter
any thanks. I'm now up and running.
Cheers
Robert
Go to the top of the page
 


RSSSearch   Top   Lo-Fi    3rd July 2015 - 01:10 AM