How to print a list of all the objects of the databse

G

Guest

I have more than 100 object in my database ("GTHE.MDB").
Objects are included like Tables, Forms, Queries, Reports,Macros,Modules .

I just wanted to print the list of object names from a Form Command Button
press event :
The list should look like as follows :

Tables:
ABC
MDB
CDC

Forms:
Emploe
SalesM

Could any of the professional can advise me , what code to write for this.
This will make me search my required objects easily.
 
A

Allen Browne

This query should do it:
SELECT MSysObjects.Type, MsysObjects.Name FROM MsysObjects
WHERE (([Name] Not Like "~*") AND ([Name] Not Like "MSys*"))
ORDER BY MSysObjects.Type, MsysObjects.Name;

Type Object
1 Table
4 ODBC linked table
6 Linked table
5 Query
-32768 Form
-32764 Report
-32761 Module
 
G

Guest

Tried your advised code but regret to say that I did not found as per my
requirement, all the extra details comes up and makes a confusion:

If it would have at least in a seprates columns, then it would have been had
a meaningful looks. Like for example, a Column with the Header of Tables and
all table Names below, Next Column Header Queries and all the queries name
below and so on for all objects Names with the header Related to.

I hope you understood my requirement.

As I am finding quiet difficult to handle more than 100 objects of my mdb.
If I could be able to make a seprate columns catergory wise, then it will
help me to trace faster and my job will be easier.

Regards.


Allen Browne said:
This query should do it:
SELECT MSysObjects.Type, MsysObjects.Name FROM MsysObjects
WHERE (([Name] Not Like "~*") AND ([Name] Not Like "MSys*"))
ORDER BY MSysObjects.Type, MsysObjects.Name;

Type Object
1 Table
4 ODBC linked table
6 Linked table
5 Query
-32768 Form
-32764 Report
-32761 Module

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Irshad Alam said:
I have more than 100 object in my database ("GTHE.MDB").
Objects are included like Tables, Forms, Queries, Reports,Macros,Modules .

I just wanted to print the list of object names from a Form Command Button
press event :
The list should look like as follows :

Tables:
ABC
MDB
CDC

Forms:
Emploe
SalesM

Could any of the professional can advise me , what code to write for this.
This will make me search my required objects easily.
 
B

Bas Cost Budde

Irshad said:
Tried your advised code but regret to say that I did not found as per my
requirement, all the extra details comes up and makes a confusion:

If it would have at least in a seprates columns, then it would have been had
a meaningful looks. Like for example, a Column with the Header of Tables and
all table Names below, Next Column Header Queries and all the queries name
below and so on for all objects Names with the header Related to.

I hope you understood my requirement.

As I am finding quiet difficult to handle more than 100 objects of my mdb.
If I could be able to make a seprate columns catergory wise, then it will
help me to trace faster and my job will be easier.

Allen provided you with all the information you need. If you wish extra
structure, you can structure the query using a report, or not?
 
A

Allen Browne

Yes, that's the idea. Create a report, and group by the Type for the
different headings.

If you want them in columns, you could create a crosstab query (Crosstab on
Query menu, from query design view).
 

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