G Guest Dec 2, 2003 #1 Hi Can I get Access to show me a list of all the tables in a database Thank Malcolm
B Brendan Reynolds \(MVP\) Dec 2, 2003 #2 Yes - click on the Tables tab in the Database window! OK, I guess you meant programatically? If so, and assuming Access 2000 or later ... Public Sub ListTables(ByVal SystemTables As Boolean) Dim aob As AccessObject For Each aob In CurrentData.AllTables If SystemTables Or UCase$(Mid$(aob.Name, 2, 3)) <> "SYS" Then Debug.Print aob.Name End If Next aob End Sub
Yes - click on the Tables tab in the Database window! OK, I guess you meant programatically? If so, and assuming Access 2000 or later ... Public Sub ListTables(ByVal SystemTables As Boolean) Dim aob As AccessObject For Each aob In CurrentData.AllTables If SystemTables Or UCase$(Mid$(aob.Name, 2, 3)) <> "SYS" Then Debug.Print aob.Name End If Next aob End Sub