Share via

Print table structures

Anonymous
2010-08-30T17:45:33+00:00

I need to print table structures from an Access 2007 database but can't find a way to do it.  Is there a way to do print these?

Thanks.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-08-30T17:49:37+00:00

There are tools out there that do a better job than Access, but in Access you can go to Database Tools... Documenter... Select Tables tab, select your tables, then look at Options before you click OK to select what criteria to print out (Properties, relationships, etc.)

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2010-08-30T20:29:56+00:00

    You could send a field structure to a number of places: a text file, a new or existing table, an Excel Worksheet, etc.

    The following subprocedure prints some of the field structure to the Immediate Window (Ctrl + G) of Access.

    Perhaps it will give you some ideas.

    Good Luck

    Sub List_Field_Structure()

    'Set a reference (Tools | References) to "Microsoft ActiveX Data Objects 2.8 Library"

    Dim fld As Field

    Dim intType As Integer

    Dim i As Integer

    Dim rst As ADODB.recordset

    Set rst = New ADODB.recordset

    rst.Open Source:="Select * From tbl_BgtM;", ActiveConnection:=CurrentProject.Connection, CursorType:=adOpenKeyset, LockType:=adLockOptimistic, options:=adCmdText

    For i = 0 To rst.Fields.Count - 1

        Debug.Print "Field Name:  " & rst.Fields(i).Name

        'Debug.Print "Field Value: " & rst.Fields(i).Value

        Select Case rst.Fields(i).Type

            Case 202

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Text"

            Case 203

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Memo"

            Case 2

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Integer"

            Case 3

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Long Integer"

            Case 6

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Currency"

            Case 4

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Single"

            Case 5

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Double"

            Case 7

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Date"

            Case 205

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Ole Object"

            Case 17

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Byte"

            Case 3

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "AutoNumber"

            Case 11

                Debug.Print "Field Type:  " & rst.Fields(i).Type & " or " & "Yes/No"

        End Select

        Debug.Print "Field Size:  " & rst.Fields(i).DefinedSize

        Debug.Print

        i = i + 1

    Next

    rst.Close

    Set rst = Nothing

    End Sub

    Was this answer helpful?

    0 comments No comments