Using the OpenSchema Method to List Database Tables : Table Type « Access « VBA / Excel / Access / Word






Using the OpenSchema Method to List Database Tables

 
Sub ListTbls2()
   Dim rst As ADODB.Recordset
   Set rst = CurrentProject.Connection.OpenSchema(adSchemaTables)

   Do Until rst.EOF
      Debug.Print rst.Fields("TABLE_TYPE") & " ->" _
          & rst.Fields("TABLE_NAME")
      rst.MoveNext
   Loop
End Sub

 








Related examples in the same category

1.Creating a List of Database Tables(Types of tables in the ADOX Tables collection)