timestamp

kitty77

Registered User.
Local time
Today, 17:54
Joined
May 27, 2019
Messages
715
Is there a way to have a field that time stamps anytime that record has been added, edited, changed, etc...

Thanks...
 
I use two DateTime fields for that: Created and Modified. Set the default for Created to Now() and use data macro or VBA to update Modified to Now() when the record is changed/edited.
 
Thanks
 
I get the created but how would the changed or edited look in vba? Where is the best place to put it on my form?
 
I get the created but how would the changed or edited look in vba? Where is the best place to put it on my form?
I prefer to use a data macro; but if you like to use VBA, you could place it in the BeforeUpdate event of the Form. For example:
Code:
Me.Modified=Now()
Hope that helps...
 
Yes, perfect... One more thing. How can I added who changes, edits, adds, etc...
Basically, which employee did it.
 
To record the logon name of the person on the PC on which the edit was made

Code:
Me.Modified=Now()
Me.UserName = environ("UserName")
 
Yes, perfect... One more thing. How can I added who changes, edits, adds, etc...
Basically, which employee did it.
Hi. Did you want to know when and who made the latest change only, or do you want to have a history of changes?
 
How would a history work and look? Also, the username would come from who every logs into that PC?
Most of the time, we just use one log in, so that would have to change?
 
How would a history work and look?
I was just wondering what your actual requirements were. If you need to know how the data was progressively changed from the original value, you are probably looking at an audit trail.

Most of the time, we just use one log in, so that would have to change?
Yes, if you want to know the actual person making the change, then you'll have to have a way to identify them.
 
Got it. I think I'm just going with this then. I think an audit trail may be a bit much for my needs.

Me.Modified=Now()
Me.UserName = environ("UserName")

Thanks all!
 
Got it. I think I'm just going with this then. I think an audit trail may be a bit much for my needs.

Me.Modified=Now()
Me.UserName = environ("UserName")

Thanks all!
Sounds like a plan. Good luck with your project.
 

Users who are viewing this thread

Back
Top Bottom