'添加引用Microsoft ActiveX Data Object 2.8 Library
Private Sub Command1_Click()
Dim Rs As ADODB.Recordset
Dim Cn As ADODB.Connection
Set Cn = New ADODB.Connection
'假设123.mdb在C:\下,根据你的文件位置修改以下语句
Cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\123.mdb;Persist Security Info=False"
Set Rs = Cn.OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, Empty))
Do Until Rs.EOF
If Left(Rs!table_name, 4) <> "MSys" Then '以MSys开头的是ACCESS内部表
Combo1.AddItem Rs!table_name
End If
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
Cn.Close
Set Cn = Nothing
End Sub