Is there a way to record the last time a user run a macro?
Let say a form with a text box and a button. When I click on the button the text box show me the last "date and time" the macro was ran.
Thanks.
Ismail
Should be fairly easy. If you create a function that inserts the Date/Time value into a table, then you would just call the function from the macro. Then when you click the button on the form, you would just use the DMax() function to get the value back from the table (or some variation of that idea).
The function would look like this
Code:
Function insertDateTime()
Dim strSQL
strSQL = "Insert Into myTable([DateTimefieldName]) Values (#" & Now() & "#)"
Docmd.RunSQL strSQL
End Function
Then call the function from your macro.
You will have to adjust the table and field names to your table and field.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.