Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function ListTables(db As String)
Dim dbs As DAO.Database
Dim tdfloop As DAO.TableDef
Set dbs = OpenDatabase(db)
With dbs
For Each tdfloop In .TableDefs
'Do what you want with the table names here.
Debug.Print " " & tdfloop.Name
Next tdfloop
End With
End Function
Sub cmdOK_Click
ListTables("C:\pubs.mdb")
End Sub
Public Function ListTables(Optional db As String)
Dim dbs As DAO.Database
Dim tdfloop As DAO.TableDef
If db = "" Then
Set dbs = CurrentDb
Else
Set dbs = OpenDatabase(db)
End If
With dbs
For Each tdfloop In .TableDefs
'Do what you want with the table names here.
Debug.Print " " & tdfloop.Name
Next tdfloop
End With
End Function