Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Design Data

Status
Not open for further replies.

lfarina

Programmer
Apr 25, 2005
6
US
Hello,

I need to create a report that shows the field names, types and sizes within a table. I know I can run the Documenter to get this info but I need to create a separate report that shows other info too. Is there another way to get that type of info about a table without having to run Documenter and export it out and import it back in? I'd like to be able to design one report that captures that data and other data that I have stored in other tables within the DB I am working with, I just need to get to the table design data!!
 
Take a look at the DAO.TableDef object and its Fields collection.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I am new to this stuff so I have no idea what I am looking at. I found a routine that I could possibly use but am having trouble makeing it work with my DB. Can I set this up so it is attached to a command button on a form so when the button is clicked a report will be generated? Here's the routine:

Dim db As DAO.Database
Dim tdf As DAO.TableDef
Dim fld As DAO.Field

Set db = CurrentDb

For Each tdf In db.Tables
Debug.Print tdf.Name
Debug.Print
For Each fld In tdf.Fields
Debug.Print fld.Name & " " & fld.Size & " " & fld.Type
Next
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top