Linked Table

×

יעקב

Hi,
I have a mdb file with few Linked table, Linked to a nother mdb file,
How can I found which mdb file they Linked to,

Thank you very much,
Yakov
 
P

Piet Linden

Hi,
I have a mdb file with few Linked table, Linked to a nother mdb file,
How can I found which mdb file they Linked to,

Thank you very much,
Yakov

either use the linked table manager or do something like this...

dim tdf as dao.tabledef
for each tdf in currentdb
if len(tdf.connect)>0 then
debug.print tdf.name, tdf.connect
end if
next tdf
 
K

Klatuu

Piet,
you are missing a level. It should be:

dim tdf as dao.tabledef
Dim tdfs as DAO.TableDefs

Set tdfs = CurrentDb.TableDefs
for each tdf in tdfs
if len(tdf.connect)>0 then
debug.print tdf.name, tdf.connect
end if
Set tdfs = Nothing
next tdf
 
P

Piet Linden

Piet,
you are missing a level.  It should be:

dim tdf as dao.tabledef
Dim tdfs as DAO.TableDefs

    Set tdfs = CurrentDb.TableDefs
        for each tdf in tdfs
        if len(tdf.connect)>0 then
           debug.print tdf.name, tdf.connect
        end if
    Set tdfs = Nothing
next tdf

that's what happens when you don't actually use Access to write the
stuff... my mistake... thanks Dave!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top