Private Sub GetTableNames()
Dim TableTypes As Variant
Dim i As Integer
On Error GoTo GetTableNamesError
' TableTypes = Array("Table", "Link", "Pass-through")
'====================================================================
' Collect all the table names in the database of the type we can use
'====================================================================
Set dbTable = dbCurrent.OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, "TABLE"))
' Set dbTable = dbCurrent.OpenSchema(adSchemaTables)
cboTableName.Clear
With dbTable
Do Until .EOF
For i = 0 To UBound(TableTypes)
' If UCase(!table_type) = UCase(TableTypes(i)) Then
cboTableName.AddItem !table_Name
' Exit For
' End If
Next i
.MoveNext
Loop
.Close
End With
cboTableName = GblContactTable
cboTableName.Tag = GblContactTable
Exit Sub
GetTableNamesError:
Msg = "GetTableNamesError() - " & Err.Description & vbCrLf
frmMain.ErrorLog Msg
Exit Sub
End Sub