Loop through report objects

G

Guest

Is there a way to loop through all the report objects and write their name
and description to an access table in the same database?
 
A

Allen Browne

Yes, but why?

Access already has a list of all the reports in a table. You can query it
with:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32764) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY [Name];--
Allen Browne - Microsoft MVP. Perth, Western Australia.

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

Guest

Thanks a lot. That's perfect. Are there other values to look at other objects
such as queries, tables, modules, macros, etc?

Allen Browne said:
Yes, but why?

Access already has a list of all the reports in a table. You can query it
with:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32764) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY [Name];--
Allen Browne - Microsoft MVP. Perth, Western Australia.

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

SHIPP said:
Is there a way to loop through all the report objects and write their name
and description to an access table in the same database?
 
A

Allen Browne

The Type is:
1 for tables;
6 for linked tables;
4 for ODBC linked tables;
5 for queries;
-32768 for forms;
-32761 for modules.

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

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

SHIPP said:
Thanks a lot. That's perfect. Are there other values to look at other
objects
such as queries, tables, modules, macros, etc?

Allen Browne said:
Yes, but why?

Access already has a list of all the reports in a table. You can query it
with:
SELECT [Name] FROM MsysObjects
WHERE (([Type] = -32764) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY [Name];

SHIPP said:
Is there a way to loop through all the report objects and write their
name
and description to an access table in the same database?
 

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