Connecting Tech Pros Worldwide Forums | Help | Site Map

Looking for Tables in a Database

GGerard
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello

How can I write code that would look through the current database and
generate a list of all
the tables and forms of the database (both opened and closed tables and
forms)

I am using MSACCESS 2000


Thanks
G.Gerard



Allen Browne
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Looking for Tables in a Database


For tables:
SELECT MsysObjects.Name FROM MsysObjects
WHERE (([Type] = 1) AND ([Name] Not Like "~*") AND ([Name] Not Like
"MSys*"))
ORDER BY MsysObjects.Name;
Include Type 6 for linked tables, and type 4 for ODBC linked tables.

For forms, use type -32768
Reports: -32764
Modules: -32761
Queries: 5

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"GGerard" <ggerard@nbnet.nb.ca> wrote in message
news:Ud6ce.786$Ph4.33944@ursa-nb00s0.nbnet.nb.ca...[color=blue]
>
> How can I write code that would look through the current database and
> generate a list of all
> the tables and forms of the database (both opened and closed tables and
> forms)
>
> I am using MSACCESS 2000[/color]


Closed Thread