By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,476 Members | 1,376 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,476 IT Pros & Developers. It's quick & easy.

How to track edits in a table?

P: 4
I want to track edits made in table ABC in the past week from today.
Is there a function in Access ( my database is access) that can tell me the date any of the existing/new records in the table have been edited?
Thanks
Jan 8 '09 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
No, you'd have to handle this thru VBA code. Hopefully you're not allowing data entry directly into the table but rather thru a form. You'll need to add a Date/Time field to your underlying table, named something like DateEdited. Place this field on your form. If you don't want it visible to the user, set its Visible Property to No. Now place this code in the form's code module.

For Date only:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.   Me.DateEdited = Date
  3. End Sub
For Date and Time
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_BeforeUpdate(Cancel As Integer)
  2.   Me.DateEdited = Now
  3. End Sub
Linq ;0)>
Jan 8 '09 #2

NeoPa
Expert Mod 15k+
P: 31,186
The short answer is that "No - Access doesn't maintain any such level of logging of your changes".

Should you decide that you wish to go to the trouble of implementing this feature yourself, then Linq's post will get you started in the right direction.

Welcome to Bytes!
Jan 8 '09 #3

MindBender77
100+
P: 234
Neopa and Linq are most certainly correct.

It really depends to what extent of tracking you wish to achieve but, you can have Access export log files daily. This is done entirely through vba from a form linked to a table. I have incorporated this with several of my projects. You could view minute to minute actions of your users if you wish.

If you decide to go this route let me know and I will provide a snippet to get you started.

Bender
Jan 9 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.