How to print a simple list of tables, queries & forms ?

  • Follow


How can I print a list of all the tables, queries and forms in my data
base?

I've tried Tools | Analyze | Documenter | Tables | Options | Select
All |
... Include for Table = Nothing
... Include for Fields = Nothing
... Include for Indexes = Nothing

We only want a simple list of tables, queries & forms.

thanks for any help.

Mel

0
Reply Mel 5/1/2007 5:38:18 PM

Dim o As AccessObject
For each o in currentData.AllTables
  debug.print o.Name
Next o

For each o in currentProject.AllForms
  debug.print o.Name
Next o

For each o in currentProject.AllQueries
  debug.print o.Name
Next o


On May 1, 10:38 am, Mel <MyEmailL...@gmail.com> wrote:
> How can I print a list of all the tables, queries and forms in my data
> base?
>
> I've tried Tools | Analyze | Documenter | Tables | Options | Select
> All |
> .. Include for Table = Nothing
> .. Include for Fields = Nothing
> .. Include for Indexes = Nothing
>
> We only want a simple list of tables, queries & forms.
>
> thanks for any help.
>
> Mel


0
Reply Susie 5/1/2007 6:10:27 PM


Hi Mel,

A couple of options for you:

http://www.accessmvp.com/djsteele/Documentor.html

http://www.accessmvp.com/JConrad/accessjunkie/csdtools.html

Both utilities are free, easy to set up, and contain zero trans fats.

-- 
Jeff Conrad - Access Junkie - MVP Alumni
Software Development Engineer in Test
XAS Services
Microsoft Corporation

Co-author - Microsoft Office Access 2007 Inside Out
Presenter - Microsoft Access 2007 Essentials
http://www.accessmvp.com/JConrad/accessjunkie.html
Access 2007 Info: http://www.AccessJunkie.com

----------
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.mspx
----------

"Mel" wrote in message:
news:1178041098.393127.165790@y5g2000hsa.googlegroups.com...

> How can I print a list of all the tables, queries and forms in my data
> base?
>
> I've tried Tools | Analyze | Documenter | Tables | Options | Select
> All |
> .. Include for Table = Nothing
> .. Include for Fields = Nothing
> .. Include for Indexes = Nothing
>
> We only want a simple list of tables, queries & forms. 


0
Reply Jeff 5/1/2007 6:17:30 PM

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.


"Mel" wrote:

> How can I print a list of all the tables, queries and forms in my data
> base?
> 
> I've tried Tools | Analyze | Documenter | Tables | Options | Select
> All |
> ... Include for Table = Nothing
> ... Include for Fields = Nothing
> ... Include for Indexes = Nothing
> 
> We only want a simple list of tables, queries & forms.
> 
> thanks for any help.
> 
> Mel
> 
> 
0
Reply Utf 5/1/2007 6:26:01 PM

On 1 May 2007 10:38:18 -0700, Mel wrote:

> How can I print a list of all the tables, queries and forms in my data
> base?
> 
> I've tried Tools | Analyze | Documenter | Tables | Options | Select
> All |
> .. Include for Table = Nothing
> .. Include for Fields = Nothing
> .. Include for Indexes = Nothing
> 
> We only want a simple list of tables, queries & forms.
> 
> thanks for any help.
> 
> Mel

No Reports?

Create a new query using this SQL:

SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Type)=1) AND ((Left([Name],4))<>"MSys")) OR
(((MSysObjects.Type)=5) AND ((Left([Name],1))<>"~")) OR
(((MSysObjects.Type)=-32768))
ORDER BY MSysObjects.Type, MSysObjects.Name;


In Query Design View, make sure the Name and Type Show check boxes are
checked.

Create a new report using the above query as it's recordsource.
In the Report Design View click on View + Sorting and Grouping.
Set up a group header on [Type], then add a sort on [Name].

In the Type Group Header section add an unbound text control:

=IIf([Type]=-32768,"Forms",IIf([Type]=1,"Tables","Queries"))

Make sure the name of this control is NOT "Type".

Include the Name field in the Detail section.
Run the report.


-- 
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
0
Reply fredg 5/1/2007 6:37:54 PM

Susie,

I tried your code as a 'standard module'

I get an error on the lase section..."Object doesn't support this
property or method"

Debug highlights this line...
For each o in currentProject.AllQueries

I even tried typing the line... and see that after currentProject.
the dropdown doesn't show AllQueries as an option.
of course it doesn't show AllTables either ???!!!

Advice on this?

And, it prints in the "debug window"
Are you suggesting I copy that, paste it in Notepad and Print to paper
from there?

thanks for the help.

Mel



0
Reply Mel 5/1/2007 6:43:19 PM

"S u s i e   DB A   [ M S F T] "   < s u s ie d b a @ ho t m a il.com> wrote:

>Dim o As AccessObject
>For each o in currentData.AllTables
>  debug.print o.Name
>Next o
>
>For each o in currentProject.AllForms
>  debug.print o.Name
>Next o
>
>For each o in currentProject.AllQueries
>  debug.print o.Name
>Next o

Note that this person is really A a r o n   K e m p f and that he is not an employee
of Microsoft.

Tony
-- 
Tony Toews, Microsoft Access MVP
   Please respond only in the newsgroups so that others can 
read the entire thread of messages.
   Microsoft Access Links, Hints, Tips & Accounting Systems at 
http://www.granite.ab.ca/accsmstr.htm
0
Reply Tony 5/1/2007 6:54:38 PM

note that Tony is niether MOST, VALUABLE -OR- A PROFESSIONAL

he is a MDB cry baby


"Tony Toews [MVP]" <ttoews@telusplanet.net> wrote in message
news:s63f33p9vcnklmqimd3o4eg6ltfc6d9olf@4ax.com...
> "S u s i e   DB A   [ M S F T] "   < s u s ie d b a @ ho t m a il.com>
wrote:
>
> >Dim o As AccessObject
> >For each o in currentData.AllTables
> >  debug.print o.Name
> >Next o
> >
> >For each o in currentProject.AllForms
> >  debug.print o.Name
> >Next o
> >
> >For each o in currentProject.AllQueries
> >  debug.print o.Name
> >Next o
>
> Note that this person is really A a r o n   K e m p f and that he is not
an employee
> of Microsoft.
>
> Tony
> -- 
> Tony Toews, Microsoft Access MVP
>    Please respond only in the newsgroups so that others can
> read the entire thread of messages.
>    Microsoft Access Links, Hints, Tips & Accounting Systems at
> http://www.granite.ab.ca/accsmstr.htm


0
Reply Aaron 5/2/2007 9:29:10 PM

sorry it might be CURRENTDATE.AllTables

sorry I don't use MDB at all for anything



"Mel" <MyEmailList@gmail.com> wrote in message
news:1178044999.208256.51270@u30g2000hsc.googlegroups.com...
> Susie,
>
> I tried your code as a 'standard module'
>
> I get an error on the lase section..."Object doesn't support this
> property or method"
>
> Debug highlights this line...
> For each o in currentProject.AllQueries
>
> I even tried typing the line... and see that after currentProject.
> the dropdown doesn't show AllQueries as an option.
> of course it doesn't show AllTables either ???!!!
>
> Advice on this?
>
> And, it prints in the "debug window"
> Are you suggesting I copy that, paste it in Notepad and Print to paper
> from there?
>
> thanks for the help.
>
> Mel
>
>
>


0
Reply Aaron 5/2/2007 9:29:41 PM

god that code is just ridiculous

yet another reason you should use SQL Server-- it doesn't make you
remember obscure integer values


C =3D Check constraint
D =3D Default (constraint or stand-alone)
P =3D SQL stored procedure
FN =3D SQL scalar function
R =3D Rule
RF =3D Replication filter procedure
TR =3D SQL trigger (schema-scoped DML trigger, or DDL trigger at either
the database or server scope)
IF =3D SQL inline table-valued function
TF =3D SQL table-valued function
V =3D View




On May 1, 11:26 am, Jerry Whittle
<JerryWhit...@discussions.microsoft.com> wrote:
> SELECT
> IIf([MSysObjects].[Type]=3D1,'TABLE',IIf([MSysObjects].[Type]=3D5,'QUERY'=
,IIf([=ADMSysObjects].[Type]=3D-32768,'FORM',IIf([MSysObjects].[Type]=3D-32=
764,'REPORT',=ADIIf([MSysObjects].[Type]=3D-32766,'MACRO',IIf([MSysObjects]=
..[Type]=3D-32761,'MO=ADDULE',IIf([MSysObjects].[Type]=3D-32756,'PAGE',IIf([=
MSysObjects].[Type]=3D8,'RE=ADLATIONSHIPS',IIf([MSysObjects].[Type]=3D6,'TA=
BLE
> LINKED','Unknown'))))))))) AS ObjectType, MSysObjects.Name, MSysObjects.T=
ype
> 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]=3D1,'TABLE',IIf([MSysObjects].[Type]=3D5,'QUERY'=
,IIf([=ADMSysObjects].[Type]=3D-32768,'FORM',IIf([MSysObjects].[Type]=3D-32=
764,'REPORT',=ADIIf([MSysObjects].[Type]=3D-32766,'MACRO',IIf([MSysObjects]=
..[Type]=3D-32761,'MO=ADDULE',IIf([MSysObjects].[Type]=3D-32756,'PAGE',IIf([=
MSysObjects].[Type]=3D8,'RE=ADLATIONSHIPS',IIf([MSysObjects].[Type]=3D6,'TA=
BLE
> LINKED','Unknown'))))))))), MSysObjects.Name;
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
>
> "Mel" wrote:
> > How can I print a list of all the tables, queries and forms in my data
> > base?
>
> > I've tried Tools | Analyze | Documenter | Tables | Options | Select
> > All |
> > ... Include for Table =3D Nothing
> > ... Include for Fields =3D Nothing
> > ... Include for Indexes =3D Nothing
>
> > We only want a simple list of tables, queries & forms.
>
> > thanks for any help.
>
> > Mel- Hide quoted text -
>
> - Show quoted text -


0
Reply Susie 5/7/2007 11:06:41 PM

9 Replies
824 Views

(page loaded in 5.134 seconds)

Similiar Articles:
















7/19/2012 6:11:00 PM


Reply: