Button to add current date

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

Guest

I have several date fields on a form. In most cases, the date to be entered
is the current date. Is there a way I can add a button under each field that
when clicked will add the current date to that field? I've tried a few
variations, but can't get it to work. I don't want the default value to be
Now(), because a blank field indicates there is still work to be done.
Thanks! Mary
 
Instead if a button I would do it as a double-click on the date field but
either way works. I just don't like adding controls to a form unless I have
to. It keep things from getting too cluttered.

Private Sub txtDateField_DblClick(Cancel As Integer)
Me.txtDateField = Date()
End Sub

Tony V
 
Mary,

You may be interested to know that Access has a built-in keyboard
shortcut for this purpose. Press Ctrl+; to enter today's date.
 
Back
Top