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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to be able to allow users to just double click the "DateIn" Field and
it will fill in the date & Time.
 
In the textbox's DoubleClick event, put code like:

Private Sub txtDateIn_DblClick(Cancel As Integer)
Me.txtDateIn = Now()
End Sub
 
In the control's DoubleClick event, create a procedure something like:

Me!ThisTextBox = Now()

Regards

Jeff Boyce
<Office/Access 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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top