Results 1 to 2 of 2

Thread: view table structure for printing in access?

  1. #1

    Thread Starter
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945

    view table structure for printing in access?

    I want to be able to print out the column names and datatypes for my tables in access. Does anyone know a way to do this?
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  2. #2
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    VB Code:
    1. Dim tbl As TableDef
    2. Dim x As Integer
    3. Set tbl = DBEngine(0)(0).TableDefs("TableName")
    4. For x = 0 To tbl.Fields.count - 1
    5.     Debug.Print tbl.Fields(x).Name
    6.     Debug.Print tbl.Fields(x).Type
    7. Next

    type will return Numbers...you need to figure out what is what
    I know 10 is text 4 is Long and 1 is Boolean (Yes/No)
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width