Nov 10 2010, 08:12 AM
would like to display on my form, the date that the Database records were last updated. (not viewed, but actually changed) ..What is the bestest easy way to do this?
Nov 10 2010, 09:44 AM
Access doesn't capture that information, so you're going to have to do it...
One way would be to add a LastUpdated field to each table, and ensure that it gets updated in the BeforeUpdate event of each form. Then, you'll have to run a query against the tables to determine the greatest value of the LastUpdated field.
Another way would simply be to have a LastUpdated table with a single row in it, then update that field in the AfterUpdate event of every form.
Nov 10 2010, 09:46 AM
Depends on how you have your database setup. If you have a primary table that is relationship to all the child tables then it's pretty easy. Just add a field to that table and name it LastModified. Then on your forms you can add in an event on the properties of the form. On Data Change. Update that field to be the date. If you have the modified field on the current form as a hidden field makes it even easier.
o it would look like this.
me.modifieddate = Now()
me.modifieddate = Date()
Nov 10 2010, 09:57 AM
You said to call the field LastModified, yet your code is updating modifieddate...
Nov 10 2010, 09:59 AM
hahahahaha.. well.. you know what i meant <.
Nov 12 2010, 01:48 AM
EXCELLENT!! Thank-you, Gentlemen!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here