Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting tables details

Status
Not open for further replies.

Killa

Programmer
Oct 19, 2001
56
US
Is there a way of getting the table info from a ms access database i need to get the quantity of tables and the names of these tables
i open the database like this

Set dbpartnumbers = OpenDatabase("L:\Part & Drawing Registers\database\partnumbers.mdb")


Debug.Print dbpartnumbers.Recordsets.Count <<<< this returned a 0


any ideas ????
 
If you are using the access object you can use the following:

Dim MyTableList as String
MyTableList = &quot;&quot;

For i = 0 To CurrentDb.TableDefs.Count - 1

If Left(CurrentDb.TableDefs.Item(i).Name, 4) <> &quot;MSys&quot; Then
If MyTableList = &quot;&quot; Then
MyTableList = CurrentDb.TableDefs.Item(i).Name
Else
MyTableList = MyTableList & &quot;,&quot; & CurrentDb.TableDefs.Item(i).Name
End If
End If
Next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top