Results 1 to 4 of 4
  1. #1
    Moscuba is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Posts
    1

    How to document a database. CAn we download the list of queries

    Hi,



    I would like a list of all the queries and tables in a database. Is there a way to "query" the database and download (to Excel/word) the list of queries and tables?

    Thank you

    Scoobs

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Code:
    Public Sub dpAllQrys()
    Dim db As Database
    Dim qdf As QueryDef
    dim tdf as tabledef
    Dim sSql As String
    
    Set db = CurrentDb
    debug.print "tables"
    For Each tdf In db.tableDefs
          Debug.Print tdf.name
    Next
    
    debug.print "queries"
    For Each qdf In db.QueryDefs
          Debug.Print qdf.name
    Next
    
    Set tdf= Nothing
    Set qdf = Nothing
    Set db = Nothing
    End Sub

  3. #3
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If you want to output the list to a file instead of the debug.print statement ranman posted you could create a text file pretty easily with the filesystemobject commands


    dim fs
    dim f

    set fs = createobject("scripting.filesystemobject")
    set f = fs.createtextfile("c:\test\TablesandQueries.txt")

    then instead of the debug.print use f.writeline

    and close it with

    set f = nothing
    set fs = nothing

  4. #4
    thebigthing313 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2014
    Posts
    119
    You can also use the Database Documenter under Database Tools. You will have the option to document pretty much anything and everything about your database. And the report generated will be quite in-depth.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-23-2014, 09:36 AM
  2. document database
    By Mbakker71 in forum Database Design
    Replies: 8
    Last Post: 12-27-2013, 02:14 PM
  3. How to document a access database?
    By snoopy in forum Access
    Replies: 8
    Last Post: 11-12-2012, 09:34 PM
  4. Training database for Download
    By macdca in forum Database Design
    Replies: 1
    Last Post: 06-18-2011, 10:28 AM
  5. Document Database
    By Wrangler in forum Access
    Replies: 2
    Last Post: 01-22-2010, 11:16 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums