How to print names of all forms in DB?

E

Eef Houniet

Hello,

The following procedure prints the name of each table in a database.

Public Sub NameEachTable()
'Access 2000 VBA Handbook page 466

Dim tbl As TableDef
For Each tbl In CurrentDb.TableDefs
Debug.Print tbl.name
Next tbl

End Sub

I can't find something like that, to print the names of the forms.
I will be much obliged for assistance.

Eef Houniet
 
G

Guest

Use this query to return the names of all the forms in the current mdb

SELECT MSysObjects.Name
FROM MSysObjects
WHERE MSysObjects.Type=-32768
 
A

Albert D.Kallal

Are you looking for a way to do this in code, or you do you just want a
printout of the forms?

There is a built in documentation system in ms-access that can print out ALL
objects. Thus, the documenter can printout all reports, forms, or whatever
you want.

So, just go tools->analyze->documenter

just remember if you want JUST a list of tables, or just a list of tables
and their fields in a NICE column format to use the "options" button. If you
don't turn off some of the options, you will EASILY generate a whole paper
tray of output.

So, for forms, click on the options button, and de-select ALL OF the
options, and for sections and controls set to nothing. The end result will
be just a listing of the forms names. Of course, do play with some of the
options, as you can print near as much information about each form as you
want.
 
E

Eef Houniet

Ofer,

Exactly what I was looking for.
Thank you

Eef Houniet
Buurmalsen
Nederland
 
E

Eef Houniet

Albert,

Thank you for message. I had completely overlooked this possibilities.

Eef Houniet
Buurmalsen
Nederland
 
E

Eef Houniet

Ofer,

Could you please tell me, where to find the codes like Objects Types?

Eef Houniet
Buurmalsen
Nederland
 
G

Guest

Goto tools, options, choose the tab "View", select to display system objects.
Now you have few tables display in the DB, they all start with Msys...

One of the tables called MSysObjects, open it, select one of the objects
name that you have in the MDB (Form, table, report) filter the name, and you
will see in the Type field, that type of the objects
 
E

Eef Houniet

Thank you for your answer.

Eef Houniet

Ofer said:
Goto tools, options, choose the tab "View", select to display system
objects.
Now you have few tables display in the DB, they all start with Msys...

One of the tables called MSysObjects, open it, select one of the objects
name that you have in the MDB (Form, table, report) filter the name, and
you
will see in the Type field, that type of the objects
 

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