Try this:
Add a listbox called "lstTables" to a form. Add a reference to Microsoft DAO 3.6 Object Library (or whichever version you have the latest of) and paste this code into the Form_Load event.Code:Dim dbTest As Database Set dbTest = OpenDatabase("MyDB.mdb", False, False, ";pwd=" & "MyPassword") Dim tblObj As DAO.TableDef Dim intI As Integer lstTables.Clear For Each tblObj In dbTest.TableDefs If UCase(Left(tblObj.Name, 4)) <> "MSYS" Then lstTables.AddItem tblObj.Name End If Next dbTest.Close




Reply With Quote