Hi all.
Does someone know how to get all the table names of the current db ....
Thanks,
Gina
Hi,
you can either loop through Cirrentdb.TableDefs collection, or make a query
on MSysObjects table, filtering for Type=1

Signature
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
> Hi all.
>
> Does someone know how to get all the table names of the current db ....
>
> Thanks,
> Gina
> Hi all.
>
> Does someone know how to get all the table names of the current db
DAO version:
'=======
Dim db As DAO.Database
Dim tdf As DAO.TableDef
Set db = CurrentDb
For each tdf in db.TableDefs
' skip system tables
If Left(tdf.Name, 4) <> "MSys" Then
Debug.Print tdf.Name
End If
Next tdf
Set db = Nothing
'=======
In Access 2000 or later, you can also do this:
'=======
Dim ao As AccessObject
For Each ao in CurrentData.AllTables
' skip system tables
If Left(tdf.Name, 4) <> "MSys" Then
Debug.Print ao.Name
End If
Next ao
'=======
You could also do it with ADOX, but I don't have that code off the top
of my head.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Gina - 27 Jul 2005 14:43 GMT
... thanks guys for you fast answers !!!!
great ....
Gina :)
> > Hi all.
> >
[quoted text clipped - 37 lines]
> You could also do it with ADOX, but I don't have that code off the top
> of my head.