×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Print Table, Query, Form,Report and Macro names

Print Table, Query, Form,Report and Macro names

Print Table, Query, Form,Report and Macro names

(OP)
Is there any way to get a print out of all the Names of each table form etc...I dont want a print out of all the fields just the names...Setting up security is tough when there is so many table names etc..As you all know it cuts off the names when setting up security..

Thanks in Advance DVannoy
A+,Network+,CNA
dvannoy@onyxes.com

RE: Print Table, Query, Form,Report and Macro names

You could do this in vba code using the TableDef collection like below (probably wouldn't want to do it with a message box though, but...for simplicity's sake...) Or you could just directly query the MSysObjects table (name & type). Each different object type will have a different type value. Be careful that you don't accidentally update the MSysObjects table or you'll cause problems.

Dim dbs As Database
Dim tdf As TableDef
  
Set dbs = CurrentDb
dbs.TableDefs.Refresh
    With dbs
        For Each tdf In dbs.TableDefs
           MsgBox (tdf.Name)
        Next tdf
    .Close
    End With
End Sub

Hope this helps...

jj
jjones@cybrtyme.com


 
 

RE: Print Table, Query, Form,Report and Macro names

(OP)
Where would this code go..behind a button or on a report?

Thanks for your help

DVannoy
A+,Network+,CNA
dvannoy@onyxes.com

RE: Print Table, Query, Form,Report and Macro names

The code is just a sample that would go behind a button & display a message box each displaying each table name, if you need to generate a complete list, the easiest method would probably just be to query the MSysObjects table. If you don't see this table in your database window, go to the Tools | Options menu and select the checkbox to Show System Objects.

Then, you can write a query against this table (use the name field and the type field where type equals number assigned to the type of objects you want a list of).

Good luck!

J. Jones
jjones@cybrtyme.com

RE: Print Table, Query, Form,Report and Macro names

jjonesal example will work. Getting to the forms, reports and modules is a little tricker. If you reference these collection, they only give you a list of what's open.

This is out of the help:

Document        Container    Contains information about
Form            Forms            Saved form
Macro            Scripts            Saved macro
Module            Modules            Saved module
Report            Reports            Saved report
SummaryInfo    Databases    Database document summary
UserDefined    Databases    User-defined properties


Go to the object browser (F2 in the VBE) and search for document of container...

Tyrone Lumley
augerinn@gte.net
http://server47.hypermart.net/databaseguy

RE: Print Table, Query, Form,Report and Macro names

This may be late, but I can remember my greatest problem as a newbie was getting a printout of my table and field structures without sending a copy of the form to the printer.  One day out of desperation I found the Tools|Analyze|Documentor function.  By setting the options, you can get the information you need in a very nice printout.

mac318

RE: Print Table, Query, Form,Report and Macro names

This may be late, but I can remember my greatest problem as a newbie was getting a printout of my table and field structures without sending a copy of the form to the printer.  One day out of desperation I found the Tools|Analyze|Documentor Menu Item.  By setting the options, you can get the information you need in a very nice printout.

mac318

RE: Print Table, Query, Form,Report and Macro names

Sorry for the double post; but, I thought I had successfully stopped the post, in order to, correct an error.  

mac318

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close