Database content

T

Tony Williams

Is there anyway I can print a list of the tables forms,reports etc from my
database. I've looked at Documenter but it gives too much information. What
I want is just the name. I suppose it would be good to have the control
source name of forms and reports as well, but no more detail than that.
Is there a way?
Thanks
Tony
 
J

Jerry Whittle

It's a little ugly, but paste the statement below into a new query in SQL view.

SELECT IIf([MSysObjects].[Type]=1,'TABLE',
IIf([MSysObjects].[Type]=5,'QUERY',
IIf([MSysObjects].[Type]=-32768,'FORM',
IIf([MSysObjects].[Type]=-32764,'REPORT',
IIf([MSysObjects].[Type]=-32766,'MACRO',
IIf([MSysObjects].[Type]=-32761,'MODULE',
IIf([MSysObjects].[Type]=-32756,'PAGE',
IIf([MSysObjects].[Type]=8,'RELATIONSHIPS',
IIf([MSysObjects].[Type]=6,'TABLE LINKED','Unknown'))))))))) AS ObjectType,
MSysObjects.Name,
MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "~*"
And (MSysObjects.Name) Not Like "Msys*")
AND ((MSysObjects.Type) Not In (2,3)))
ORDER BY IIf([MSysObjects].[Type]=1,'TABLE',
IIf([MSysObjects].[Type]=5,'QUERY',
IIf([MSysObjects].[Type]=-32768,'FORM',
IIf([MSysObjects].[Type]=-32764,'REPORT',
IIf([MSysObjects].[Type]=-32766,'MACRO',
IIf([MSysObjects].[Type]=-32761,'MODULE',
IIf([MSysObjects].[Type]=-32756,'PAGE',
IIf([MSysObjects].[Type]=8,'RELATIONSHIPS',
IIf([MSysObjects].[Type]=6,'TABLE LINKED','Unknown'))))))))),
MSysObjects.Name;
 
T

Tony Williams

Thanks Jerry used the suggestion from Doug Steele, no benefit in reinventing
the wheel.Thanks anyway
Tony
Jerry Whittle said:
It's a little ugly, but paste the statement below into a new query in SQL
view.

SELECT IIf([MSysObjects].[Type]=1,'TABLE',
IIf([MSysObjects].[Type]=5,'QUERY',
IIf([MSysObjects].[Type]=-32768,'FORM',
IIf([MSysObjects].[Type]=-32764,'REPORT',
IIf([MSysObjects].[Type]=-32766,'MACRO',
IIf([MSysObjects].[Type]=-32761,'MODULE',
IIf([MSysObjects].[Type]=-32756,'PAGE',
IIf([MSysObjects].[Type]=8,'RELATIONSHIPS',
IIf([MSysObjects].[Type]=6,'TABLE LINKED','Unknown'))))))))) AS
ObjectType,
MSysObjects.Name,
MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "~*"
And (MSysObjects.Name) Not Like "Msys*")
AND ((MSysObjects.Type) Not In (2,3)))
ORDER BY IIf([MSysObjects].[Type]=1,'TABLE',
IIf([MSysObjects].[Type]=5,'QUERY',
IIf([MSysObjects].[Type]=-32768,'FORM',
IIf([MSysObjects].[Type]=-32764,'REPORT',
IIf([MSysObjects].[Type]=-32766,'MACRO',
IIf([MSysObjects].[Type]=-32761,'MODULE',
IIf([MSysObjects].[Type]=-32756,'PAGE',
IIf([MSysObjects].[Type]=8,'RELATIONSHIPS',
IIf([MSysObjects].[Type]=6,'TABLE LINKED','Unknown'))))))))),
MSysObjects.Name;
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.

Tony Williams said:
Is there anyway I can print a list of the tables forms,reports etc from
my
database. I've looked at Documenter but it gives too much information.
What
I want is just the name. I suppose it would be good to have the control
source name of forms and reports as well, but no more detail than that.
Is there a way?
Thanks
Tony
 

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