In this particular case, you may find ADO Schemas useful.
This will list fields and some properties for a particular table. Be careful of data types, you may not get an exact match to DAO types. You will need a reference to Microsoft ActiveX Data Objects x.x Library
, unless you use late binding.
Dim cn As New ADODB.Connection, cn2 As New ADODB.Connection
Dim rs As ADODB.Recordset, rs2 As ADODB.Recordset
Set cn = CurrentProject.Connection
Set rs = cn.OpenSchema(adSchemaTables, _
Array(Empty, Empty, Empty, "tablenamehere"))
While Not rs.EOF
Debug.Print rs!table_name; " desc= "; rs!Description
Set rs2 = cn.OpenSchema(adSchemaColumns, _
Array(Empty, Empty, "" & rs!table_name & ""))
While Not rs2.EOF
Debug.Print " " & rs2!Column_Name
Debug.Print " " & rs2!Data_Type
Debug.Print " " & rs2!Description
Debug.Print " " & rs2!Is_Nullable
rs2.MoveNext
Wend
rs.MoveNext
Wend
rs.Close
Set cn = Nothing
You can also look at things the other way around and get a list of tables that contain a particular field.
Dim cn As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim strTempList As String
On Error GoTo Error_Trap
Set cn = CurrentProject.Connection
'Get names of all tables that have a column called <SelectFieldName>
Set rs = cn.OpenSchema(adSchemaColumns, _
Array(Empty, Empty, Empty, SelectFieldName))
'List the tables that have been selected
While Not rs.EOF
'Exclude MS system tables
If Left(rs!Table_Name, 4) <> "MSys" Then
strTempList = strTempList & "," & rs!Table_Name
End If
rs.MoveNext
Wend
ListTablesContainingField = Mid(strTempList, 2)
From: http://wiki.lessthandot.com/index.php/ADO_Schemas
Stackoverflow has quite a bit on the subject: https://stackoverflow.com/search?q=%5Bms-access%5D+schema
Are you specifically looking for SQL and/or VBA only? Did you try the database documenter? – CharlieRB – 2012-06-14T19:58:21.813
SQL solution is preferred but if that's not possible then VBA will do. The database documenter is what I use today (with options set to a minimum). But I was hoping to have it in tabular form (less noise) similar to when I pull from MSysObjects (as shown in my example). – daniellopez46 – 2012-06-14T20:49:05.103