Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Properties

Status
Not open for further replies.

bestbefore99

IS-IT--Management
Jan 24, 2002
16
IT
How do I find Table Properties in the Current Database?

So far I have only managed to get information on Table Names, but I want more info such as Creation Date, Nr of Records, etc

Thanks gurus!

Max
 
CurrentDb.TableDefs("tbl1").DateCreated
CurrentDb.TableDefs("tbl1").RecordCount

and some other options.. tbl1 is the name of the table

--------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
 
THanks a lot NVSBe.

My code for getting the list of tables however was

Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
Open "C:\Tabelle.txt" For Output As #3

For Each obj In dbs.AllTables

Write #3, obj.Name

Next obj

Close #3

Is any other way of finding the Tables Names using DAO?



My problem actually is more general. I have to keep track of who is doing what on a database (Auditing Function)


Thanks
Massimo
 
I'd use the following code. It also puts the Access System tables in the output file though, I'm not sure if you want those.

Dim obj As Object

Open "C:\Tabelle.txt" For Output As #3

For Each obj In CurrentDb.TableDefs

Write #3, obj.Name, obj.DateCreated, obj.RecordCount

Next obj

Close #3
--------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top