• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1194
  • Last Modified:

VBA code to activate timestamp button on Access 2007 form

The Form in question, has four task categories and four adjacent time entry fields, currently users type in current time as they complete each task...and they complain about having to type.

I would like to create a command button for each time stamp, this would make it much easier for users to enter time as each task is completed.

I have very little experience in VBA.


Thanks much
0
lucyLuna
Asked:
lucyLuna
  • 2
1 Solution
 
DhaestCommented:
0
 
lucyLunaAuthor Commented:
@Dhaest, Thank you for the link...my problem now is:

What code I need to add to the command button's "on click" event, which will input" time() " into a field?

Also...is it better, or possible to write a macro for this function, instead of VBA?

It is likely I missed the solution in your reply...please point it out...I am new at this.

Thanks much
0
 
GugroCommented:
Use this in the Button OnClick Event:

Private Sub MyButton_Click()
  Me.MyDateTimeFile = Now()
End Sub
0
 
lucyLunaAuthor Commented:
Thank you so much, Gugro, your solution worked perfect!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now