Need to document query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone, it's been a little while since I visited. Using A02 on XP. Need
to document my work and lots of queries have fields that perform IIfs,
Switches, calculations, all sorts of things. I tried Tools, Analyze,
Documenter. But all I get is tons of information and the FieldName. That's
it. I need to see the data AFTER the field name. Such as this: I have a
field: PolNum: =Right([PlanNum],4) and I want to see all of that not just
PolNum. Other than copying and pasting each one (and missing the criteria
line which would be nice to have as well). The Documenter's SQL segment does
show the data but it's jumbled together and I can't take it to Word to parse
it out for readability. Is this the best I can do? Any advice?

Thanks in advance for any help!!!
 
Hi everyone, it's been a little while since I visited. Using A02 on XP. Need
to document my work and lots of queries have fields that perform IIfs,
Switches, calculations, all sorts of things. I tried Tools, Analyze,
Documenter. But all I get is tons of information and the FieldName. That's
it. I need to see the data AFTER the field name. Such as this: I have a
field: PolNum: =Right([PlanNum],4) and I want to see all of that not just
PolNum. Other than copying and pasting each one (and missing the criteria
line which would be nice to have as well). The Documenter's SQL segment does
show the data but it's jumbled together and I can't take it to Word to parse
it out for readability. Is this the best I can do? Any advice?

Thanks in advance for any help!!!

So all you really need is the SQL for each query?
not much to that...
or you could grab Danny Lesandrini's documentor, which does a nice job
churning out reports.
www.amazecreations.com/datafast

using DAO... (so make sure you have a reference to it)

Public Sub ListSQLs()
dim qdf as dao.querydef
for each qdf in DBEngine(0)(0).QueryDefs
If Left$(qdf.Name,1)<>"~" Then '---those are for controls
etc
debug.print qdf.name
debug.print qdf.SQL
debug.print 'blank line
end if
next qdf
End Sub

If you wanted to send the results to a text file, you'd open it at the
top of the procedure and then use PRINT or WRITE (one of them wraps
everything in quotes, if I remember right) instead of the Debug.Print
statements.
 
Hi there! Thanks a bunch for the info. Took me forever to get in here and
see your reply. Makes sense, looks good. I'll give it a try sometime soon.

I appreciate your time!

--
Bonnie W. Anderson
Cincinnati, OH


Hi everyone, it's been a little while since I visited. Using A02 on XP. Need
to document my work and lots of queries have fields that perform IIfs,
Switches, calculations, all sorts of things. I tried Tools, Analyze,
Documenter. But all I get is tons of information and the FieldName. That's
it. I need to see the data AFTER the field name. Such as this: I have a
field: PolNum: =Right([PlanNum],4) and I want to see all of that not just
PolNum. Other than copying and pasting each one (and missing the criteria
line which would be nice to have as well). The Documenter's SQL segment does
show the data but it's jumbled together and I can't take it to Word to parse
it out for readability. Is this the best I can do? Any advice?

Thanks in advance for any help!!!

So all you really need is the SQL for each query?
not much to that...
or you could grab Danny Lesandrini's documentor, which does a nice job
churning out reports.
www.amazecreations.com/datafast

using DAO... (so make sure you have a reference to it)

Public Sub ListSQLs()
dim qdf as dao.querydef
for each qdf in DBEngine(0)(0).QueryDefs
If Left$(qdf.Name,1)<>"~" Then '---those are for controls
etc
debug.print qdf.name
debug.print qdf.SQL
debug.print 'blank line
end if
next qdf
End Sub

If you wanted to send the results to a text file, you'd open it at the
top of the procedure and then use PRINT or WRITE (one of them wraps
everything in quotes, if I remember right) instead of the Debug.Print
statements.
 

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

Similar Threads


Back
Top