current date button

bricklebrit

Registered User.
Local time
Today, 21:36
Joined
Feb 10, 2002
Messages
41
Hello,

I am attempting to create a button that when clicked in the form that will put the current date in the [OrderDate] field. Is there a simple command to to do this?

Thanks in advance for your assistance!
 
briclebrit

Try the following:

Code:
Private Sub [YourButtonName]_Click()

    Me![YourFieldName] = Date

End Sub

HTH
 
HTH -

Thanks for the prompt response -- works brialliantly.
 
You can also set your OrderDate field to Default: Date(), that way a new record will automatically have this without the extra buttonclick. That may not serve your needs, just giving an alternative option.

Good luck,
David R
 

Users who are viewing this thread

Back
Top Bottom