Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rating: Thread Rating: 14 votes, 5.00 average. Display Modes
Old 03-02-2012, 01:09 PM   #1
VelvetVoice
Newly Registered User
 
Join Date: Mar 2012
Posts: 12
Thanks: 1
Thanked 1 Time in 1 Post
VelvetVoice is on a distinguished road
How do I print a list of tables, reports, forms, modules?

Hi! How do I print a list of tables, reports, forms, modules? I was looking at another forum and it gave me an SQL of how to do it, but I wasn't sure where to put it.

VelvetVoice is offline   Reply With Quote
Old 03-02-2012, 01:32 PM   #2
John Big Booty
AWF VIP
 
John Big Booty's Avatar
 
Join Date: Aug 2005
Location: Planet 10, by way of the Eighth Dimension
Posts: 8,263
Thanks: 113
Thanked 1,011 Times in 865 Posts
John Big Booty is a jewel in the rough John Big Booty is a jewel in the rough John Big Booty is a jewel in the rough
Re: How do I print a list of tables, reports, forms, modules?

Perhaps the article here will explain what you need to do.
__________________
...but they're only monkey boys!!!
John Big Booty is offline   Reply With Quote
Old 03-02-2012, 01:33 PM   #3
VelvetVoice
Newly Registered User
 
Join Date: Mar 2012
Posts: 12
Thanks: 1
Thanked 1 Time in 1 Post
VelvetVoice is on a distinguished road
Re: How do I print a list of tables, reports, forms, modules?

Got it. Here's my solution:

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;

Paste this SQL in a query, I hit the Query design button. Run it, and you have your list.

VelvetVoice is offline   Reply With Quote
The Following User Says Thank You to VelvetVoice For This Useful Post:
Steve@trop (08-19-2013)
Old 08-19-2013, 06:16 AM   #4
Steve@trop
Newly Registered User
 
Join Date: May 2013
Location: Bradenton, FL
Posts: 142
Thanks: 40
Thanked 1 Time in 1 Post
Steve@trop is on a distinguished road
Re: How do I print a list of tables, reports, forms, modules?

I came across this in a search. Even though it is over a year old it still did exactly what I needed!

Thanks!

Steve
Steve@trop is offline   Reply With Quote
Old 04-02-2014, 03:05 PM   #5
CCS
Newly Registered User
 
Join Date: Jul 2013
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
CCS is on a distinguished road
Thumbs up Re: How do I print a list of tables, reports, forms, modules?

This is perfect - thank you!
You should submit it to MS and suggest they include it with the documenter

Quote:
Originally Posted by VelvetVoice View Post
Got it. Here's my solution:

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;

Paste this SQL in a query, I hit the Query design button. Run it, and you have your list.
CCS is offline   Reply With Quote
Old 02-24-2017, 07:12 PM   #6
Alien
Newly Registered User
 
Join Date: Feb 2017
Location: Thailand
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Alien is on a distinguished road
Re: How do I print a list of tables, reports, forms, modules?

Many thanks for this. It's just what I wanted - and it worked wonderfully.
Very grateful.

Alien is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print a list of used tables and populated fields Pierre Beauchamp Tables 2 07-27-2010 03:47 AM
Hide / Unhide All forms - reports - Modules editolis Modules & VBA 5 02-22-2010 06:37 AM
Using Access VBA code to count all forms, tables, queries, reports, vba modules, etc. kdnichols General 10 11-20-2008 03:24 PM
Tables, Queries, Forms, Reports and Modules Have Disappeared chathag General 1 05-25-2006 05:43 AM
Print Lists of Forms, Tables, Reports, etc. kermit5 Forms 3 12-01-2001 09:02 PM




All times are GMT -8. The time now is 07:27 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World