Linked tables - names not same in linked database

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why does a linked table NAME in database "A" not appear in the database being
linked TO? And yet refreshing the links appears to work.

Ex: database "A" has a table name Fred, which is linked to database "B".
HOWEVER, database "B" does NOT have a table named Fred. It has a table named
01-MyStuff. But Fred, in database "A" is definitely referring to the data in
"01-MyStuff in database "B". Are "aliases" at work here? If so, how to
review?
 
A linked table does not have to have the same name as the source table. The
SourceTable property of the DAO TableDef object specifies the name of the
source table ...

Public Sub PrintSourceTableName()

Dim tdf As DAO.TableDef
For Each tdf In CurrentDb.TableDefs
If Len(tdf.Connect) > 0 Then
Debug.Print tdf.name, tdf.SourceTableName
End If
Next tdf

End Sub
 
Nancy said:
Ex: database "A" has a table name Fred, which is linked to database
"B". HOWEVER, database "B" does NOT have a table named Fred. It has
a table named 01-MyStuff. But Fred, in database "A" is definitely
referring to the data in "01-MyStuff in database "B". Are "aliases"
at work here? If so, how to review?

The linked table in database 'A' can be named anything - it is just the name
of the link. If you open the link in design view and display the
properties, you can see the actual table name it is linked to.
 
Thank you! I didn't know about that "trick" :)

Joan Wild said:
The linked table in database 'A' can be named anything - it is just the name
of the link. If you open the link in design view and display the
properties, you can see the actual table name it is linked to.
 
Joan, one more question. Where would I initially setup the link to point
table FRED in database A to table 01-Mystuff in database B? Would I just key
the path directly into the properties box? Thank you.
 
Nancy said:
Joan, one more question. Where would I initially setup the link to
point table FRED in database A to table 01-Mystuff in database B?
Would I just key the path directly into the properties box? Thank
you.

File, get external data, Link...then locate the 01-Mystuff table in database
B. Once you have the link, it will be named 01-Mystuff in database A. Just
right click on the linked table and choose rename.
 
Back
Top