Hi Access Experts,
Be gentle with me....I'm an Excel guy playing in Access.
We have several DBs that our department uses for month end reporting. Each DB has several form with buttons that run macros/code & and/or print reports. What I am trying to do is have each button caption for each button, on the various forms, when clicked, to display the current date & time so users will know the last time the macro behind the button was ran. I have created a function called "Timestamp" that gives me the value I want.
Function DateStamp()
DateStamp = Format(Now(), "mm/dd/yy - h:mm am/pm")
End Function
I created another function tied to a single button the calls the function and that works too.
Function UpdateButton()
Me.Command111.Caption = DateStamp
End Function
But now I would like to know how to make the code that calls the Timestamp function generic enough so I can point any button to it and it will run. I would like to be able to use this for all the forms in this database.
Thanks,
Joe Dowski
Oxford, CT. USA.
Be gentle with me....I'm an Excel guy playing in Access.
We have several DBs that our department uses for month end reporting. Each DB has several form with buttons that run macros/code & and/or print reports. What I am trying to do is have each button caption for each button, on the various forms, when clicked, to display the current date & time so users will know the last time the macro behind the button was ran. I have created a function called "Timestamp" that gives me the value I want.
Function DateStamp()
DateStamp = Format(Now(), "mm/dd/yy - h:mm am/pm")
End Function
I created another function tied to a single button the calls the function and that works too.
Function UpdateButton()
Me.Command111.Caption = DateStamp
End Function
But now I would like to know how to make the code that calls the Timestamp function generic enough so I can point any button to it and it will run. I would like to be able to use this for all the forms in this database.
Thanks,
Joe Dowski
Oxford, CT. USA.