Trying to create a listing of my Access queries.

  • Thread starter Thread starter mar10
  • Start date Start date
M

mar10

I have a database with approximately 100 queries. I'm trying to get
a list put together in WORD that includes all the query names.

Is there something in Access that will let me either export the names,
or list them out in text format? Maybe some add-on I'm not aware of?
Right now I'm thinking my only option is to cut and paste the query
names.

Thanks for the help.
 
There is a database documenter under Tools. It will produce too much
information for most needs if you let it, on far too many pages. Read the
help on Documenter.

I add a generic text printer to my printers list, and print the output to
file. The resulting .PRN file can be opened in Word as a text file and
edited. There is probably a better way.
 
This code will write the names of all queries in the database to a text file
named 'QueryNames.txt' in the same folder as the database. Make sure you
don't have an existing file with that name in that folder, as the code will
overwrite it.

Public Sub PrintQueryNames()

Dim intFile As Integer
Dim aob As AccessObject

intFile = FreeFile
Open CurrentProject.Path & "\QueryNames.txt" For Output As intFile
For Each aob In CurrentData.AllQueries
Print #intFile, aob.Name
Next aob
Close #intFile

End Sub
 

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

Back
Top