List external database Tables and Fields

G

Guest

Using XL97 and MSQuery to mine a database of about 1000 Tables and who knows
how many Fields. Does anybody know how to print or export a list of all the
Tables and their respective Fields? Any help would be much appreciated.

TIA
Vaya con Dios,
Chuck, CABGx3
 
G

Guest

I have done something similar but with fewer tables, so I hope this helps you
out
I use a line of code that copies the Field names to a worksheet in excel but
you have to connect to the database using a ADODB Connection. This is the
line of code I used. If you would like to see other parts of the code let me
know.

For Col = 0 To Recordset.Fields.Count - 1
Sheets("List").Range("A1").Offset(0, Col).Value =
Recordset.Fields(Col).Name
Next
 

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