use "openschema" method.... just like this..cHeErs


Set adoRsFields = adoConnection.OpenSchema(adSchemaColumns)


Example:


Private Sub cmdSchema_Click()

Dim adoConnection As ADODB.Connection

Dim adoRsFields As ADODB.Recordset

Dim sConnection As String

Dim sCurrentTable As String

Dim sNewTable As String

Set adoConnection = New ADODB.Connection

sConnection = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=c:\BegDB\Biblio.mdb"

adoConnection.Open sConnection

Set adoRsFields = adoConnection.OpenSchema(adSchemaColumns)

sCurrentTable = ""

sNewTable = ""

Do Until adoRsFields.EOF

sCurrentTable = adoRsFields!TABLE_NAME

If (sCurrentTable <> sNewTable) Then

sNewTable = adoRsFields!TABLE_NAME

Debug.Print "Current Table: " & adoRsFields!TABLE_NAME

End If

Debug.Print " Field: " & adoRsFields!COLUMN_NAME

adoRsFields.MoveNext

Loop

adoRsFields.Close

Set adoRsFields = Nothing

adoConnection.Close

Set adoConnection = Nothing

End Sub