how do i make it fill the date if i double click?

T

TwinDad

I need to be able to allow users to just double click the "DateIn" Field and
it will fill in the date & Time.
 
D

Douglas J. Steele

In the textbox's DoubleClick event, put code like:

Private Sub txtDateIn_DblClick(Cancel As Integer)
Me.txtDateIn = Now()
End Sub
 
J

Jeff Boyce

In the control's DoubleClick event, create a procedure something like:

Me!ThisTextBox = Now()

Regards

Jeff Boyce
<Office/Access MVP>
 
P

Pat Hartman\(MVP\)

Why rely on them to double-click at all? If you want the date/time to be
populated whenever a record is saved or updated, you can do it with no user
action by placing the code in the Form's BeforeUpdate event. If you use
this method, you should set the locked property of the date/time field to
yes to prevent accidental changes.

Me.UpdateDateTime = Now()
 
Top