How to tell if a database contains new data.

G

Guest

The "modified date" and file stamp always shows the last time the database
was opened. Even if no changes were made to the database design OR data.

Is there an easy way to tell if data in an access database been updated so I
can display the "data date" on my startup screen or will I have to trap that
on every possible data entry screen?
 
J

John Spencer

I know of no way to get that information. I think that you will have to
code every form's update event to set and store the date, also the delete
event would need to store the date.

If you are only creating records and not modifying or deleting them, you
could just add a datetime field to every relevant table and set its default
to Date() (or Now() if you wanted date and time). On startup you would have
to get the max date from each table and then use the max of the max for the
last date a record was added.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
L

Larry Linson

pastotnikr said:
The "modified date" and file stamp always shows the last time the database
was opened. Even if no changes were made to the database design OR data.

Is there an easy way to tell if data in an access database been updated so
I
can display the "data date" on my startup screen or will I have to trap
that
on every possible data entry screen?

If you save the date in new Records, and the number of Tables of interest is
within reason, you can use a Query to determine "what's new" if you can
define what you want to compare against. If you force updates through
Forms, you can save the date of the updates, too, and that will let you
check for changes since <dateofyourchoosing>.

The simplest way would be to base a Recordset on a Query, and open the
Recordset when you want to know.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top