Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Read the tables' last modified time, and created time....

I would like to know how could I read the times (last modified time, created time) of my tables?
0
rickypk
Asked:
rickypk
  • 2
1 Solution
 
nmcdermaidCommented:
This query will give you what you want:

SELECT MSysObjects.DateUpdate, MSysObjects.DateCreate, MSysObjects.Name
FROM MSysObjects;


MSysObjects is a system table which can be viewed by pressing Tools/Options then tick System Objects on the view tab


0
 
nmcdermaidCommented:
SELECT MSysObjects.DateUpdate, MSysObjects.DateCreate, MSysObjects.Name
FROM MSysObjects
WHERE MSysObjects.Type=1;

will list only tables (including system tables)
0
 
cgedemerCommented:
There's a couple of ways to accomplish this.  The easiest is with the following sql statement:

"SELECT DateUpdated, DateCreated FROM MSysObjects WHERE Name='<table name>';"  

To view this table goto:  Tools->Options and check System Objects

or if you just want to quickly view the date you can change the your view in the database window to Details (View->Details)

In VBA there is also a .DateCreated & .LastUpated property for the tableDef object.  There's an example of how to use this property in MS-Access Help.  Hope this helps you.
0
 
peter57rCommented:
SELECT MSysObjects.DateUpdate, MSysObjects.DateCreate, MSysObjects.Name
FROM MSysObjects
WHERE MSysObjects.Type=1 or MsysObjects.Type = 6;

to include linked tables as well as local table.

Pete
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now