Finding a database's date

  • Thread starter Thread starter Daniel Friedman
  • Start date Start date
D

Daniel Friedman

Is there a way to determine the date of last modification
of an Access database? I don't mean checking the file's
modification date, since one Access file may contain
multiple databases, and I want to know when one of those
databases (tables), within the file, was last modified...

Suggestions?
Thanks very much,
--daniel
 
One way to find the most recent change to a table (for
example) is to go to Tools>Options go to the view tab and
select the Show: System Objects check box.

Then, go to tables, and open the MSysObjects Table. You
will see a field labeled DateUpdate. Then there is a
field called Name and one called Type. For an example
Tables are Type "1"

Hope this helps.

Note, when you show system objects, you can also use
those tables in a query....

Katrina
 
Hi, Daniel.

The Access file _is_ the database, which contains the tables, relationships,
queries, forms, reports, et cetera, for the database application. If you
are referring to the modification of the table structure and not
modification of the records in the table, then Katrina has already
identified an excellent method for doing so, since it can be used
programmatically in a VBA procedure or in a query, as well as viewed within
the table's datasheet.

However, if one is willing to write the SQL statement directly into the SQL
pane window, then the System Objects don't even need to be visible. One
could write the following statement:

SELECT Name, Type
FROM MSysObjects
ORDER BY Type, Name;

And the query would display the name and numerical type of each object in
the database.

Another way of displaying the modification dates of the tables (and the
other objects, as well) is to select a blank spot within the Database
Window, then right click on that spot to display the pop-up menu. Select
View -> Details to display the object names, their descriptions, their last
modification dates, their creation dates, and their object types.

HTH.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address, so that a message
will be forwarded to me.)
 
Gunny, Katrina: thank you for your suggestions. I'm afraid, though, that I
didn't ask the question precisely enough...

I want to get the date of the last change to any part of the information
stored within the table (i.e. the last modification date for the set of
records), I don't care about when the table design was last changed.

From what I've been reading, it seems there's really no simple facility for
this, and it would require coding something to check the modification dates
of each record (assuming that I coded something to indeed put in the
appropriate modification dates for each record).
Bummer?


--daniel
 
Gunny, Katrina: thanks for your suggestions. I'm afraid, though, that I
didn't ask the questions precisely enough...

What I want is the modification date for the set of records shown in the
table; I don't care about the table design's modification date. It seems
there's no easy way to get such a modification date, though...

Bummer?
 
That's correct. You'd need to add a "LastModified" field to your table, and
add code in each form's BeforeUpdate event to update that field every time a
record was updated. (you can set its default to Now, so that a value
automatically gets assigned when the record's first created). Note that this
means you can only update the data through forms.
 
Back
Top