output Access form names (1 Viewer)

alastair69

Registered User.
Local time
Today, 07:07
Joined
Dec 21, 2004
Messages
562
Hello all,

Just a quick note, is there away of outputing form names to either word or excel and also the same for table names.

Any help is usefull, even if this can not be done.

Alastair
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 01:07
Joined
Oct 28, 2001
Messages
2,504
This should get you going....
 

Attachments

  • Database Objects.zip
    37 KB · Views: 3,986

alastair69

Registered User.
Local time
Today, 07:07
Joined
Dec 21, 2004
Messages
562
Oldsoftboss said:
This should get you going....


Thanks for your help
 

namliam

The Mailman - AWF VIP
Local time
Today, 15:07
Joined
Aug 11, 2003
Messages
11,696
dim tbl as object
for each tbl in currentdb.tabledefs
debug.print tbl.name
next tbl

That should list all the table names in the debug window with some work you can do it directly into word or just copy paste.

Forms I dont think its possible unless you go into the Msys tables (which is not officially supported)

Seasons greetings from Amsterdam

The Mailman
 

allan57

Allan
Local time
Today, 14:07
Joined
Nov 29, 2004
Messages
336
For forms use the follwing

Public Function GetFormNames()

Dim dbs As Database

Dim ctrForms As Container
Dim docContainerName As document

On Error Resume Next

Set dbs = CurrentDb
Set ctrForms = dbs.Containers!Forms

For Each docContainerName In ctrForms.Documents
MsgBox docContainerName.Name 'In place of the message box create a table and append the results to the table
Next
Set ctrForms = Nothing
Set dbs = Nothing

End Function
 

ghudson

Registered User.
Local time
Today, 10:07
Joined
Jun 8, 2002
Messages
6,195
Display a list of database objects

ALL FORMS:
SELECT [MSysObjects].[Name]
FROM MSysObjects
WHERE (Left([Name],1)<>"~") And ([MSysObjects].[Type])=-32768
ORDER BY [MSysObjects].[Name];

ALL REPORTS:
SELECT [MSysObjects].[Name]
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type)=-32764))
ORDER BY MSysObjects.Name;

ALL QUERIES:
SELECT [MSysObjects].[Name]
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type)=5))
ORDER BY MSysObjects.Name;

ALL TABLES [1 = System & Access, 4 = ODBC & 6 = Access]:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type) In (1,4,6)))
ORDER BY MSysObjects.Name;

LINKED TABLES [4 = ODBC, 6 = Access]:
SELECT MSysObjects.Name, MSysObjects.Database
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type) In (4,6)))
ORDER BY MSysObjects.Name;

ALL MODULES [forms, macros, modules]:
SELECT MSysObjects.Name
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type) In (-32761,3)))
ORDER BY MSysObjects.Name;

PUBLIC MODULES
SELECT [MSysObjects].[Name]
FROM MSysObjects
WHERE (((Left([Name],1))<>"~") AND ((MSysObjects.Type)=-32761))
ORDER BY MSysObjects.Name;
 

Users who are viewing this thread

Top Bottom