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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtain "Contents" of MS-Access Database

Status
Not open for further replies.

Bachenot

Programmer
Mar 6, 2000
28
0
0
US
I would like to obtain a list of the "contents" of an MS-Access database using VB.

In MS-Access, if you go into File, Database Properties, there is a tab with "Contents".
This "Contents" tab lists the names of the tables, queries, forms, reports, macros, and modules.

It is this listing that I would like to place into an MS-Access table or Excel spreadsheet.

Any suggestions?

Thanks. [sig][/sig]
 
There are several tables included in ALL Ms Access db's which are not (normally) viewable by the user. One of them (MSysObjects) includes what you are asking for (and somewhat more). There is (was?) a toggle somewhere in the Ms Access menu structuer which shows these tables in the database window. For the moment, it's exact (and even general) location has eluded me (they say that the memory is the first thing to go ...).

Paste the following into the SQL view of an empty query

SELECT MSysObjects.*
FROM MSysObjects;


and then switch to the tableview of the query.

View/review the info. Most of it is either VERY obvious or so far removed from interest as to be in the category of things you wish you didn't know.

DO NOT change anything here, it WILL make a mess of something. You can, however, modify the query to give you the 'useful' information and make it (the query) into a maketable query and have the information you want.

Alternatives to this do exist, however I don't recommend them, as you need to know MUCH more to accomplish them.


[sig]<p>MichaelRed<br><a href=mailto:mred@duvallgroup.com>mred@duvallgroup.com</a><br>There is never time to do it right but there is always time to do it over[/sig]
 
Regarding what MichaelRed was talking about. To view the system objects Select Tools-Options-View-Show-System objects. You will then see the MSysObjects table in the table category.

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top