Can't read location of linked table

L

Laurel

I have a linked database in a server environment, and we can't find the mdb
that is really being used (by modified date). The location of the linked
tables is very long (documents and settings blah, blah, blah) and extends
beyond the size of the space. The linked table manager window can't be
stretched. Is there a way for me to see the complete location of my linked
tables? I can write code in the application mdb if I have to. If I can do
this without writing code, that would be better.

TIA
LAS
 
J

John Spencer

Open the vba window and in the immediate window type

?Currentdb().TableDefs("NameOfLinkedTable").Connect

When you press return, the entire path to the linked database should be
printed in the immediate window.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
G

Guest

To see them all simultaneously add a wide list box to an unbound form and set
the list box's properties as follows:

RowSourceType: GetList
ColumnWidths: 4cm;20cm

With the latter the centimetre values should automatically convert to inches
if you are using imperial rather than metric units. Experiment with the
first dimension if necessary to get the best fit for the table names. The
second dimension should be large enough, but if necessary make it bigger.

Note that the first property is the RowSourceType, not the RowSource which
should be left blank.

Add the following function to the form's module. Note that the first line
(the function declaration) should be entered all on one line; it may well
have wrapped over two in your newsgroup reader:

Function GetList(Fld As Control, ID As Variant, row As Variant, col As
Variant, Code As Variant) As Variant

Dim dbs As DAO.DATABASE, tdf As DAO.TableDef
Dim varFld As Variant, varReturnVal As Variant, n As Integer
Static intEntries As Integer
Static aData() As Variant


Select Case Code
Case acLBInitialize
Set dbs = CurrentDb
intEntries = dbs.TableDefs.Count
ReDim aData(intEntries, 1)
For Each tdf In dbs.TableDefs
If Len(tdf.Connect) = 0 Then
intEntries = intEntries - 1
Else
aData(n, 0) = tdf.Name
aData(n, 1) = tdf.Connect
n = n + 1
End If
Next tdf
varReturnVal = True
Case acLBOpen
varReturnVal = Timer
Case acLBGetRowCount
varReturnVal = intEntries
Case acLBGetColumnCount
varReturnVal = 2
Case acLBGetColumnWidth
varReturnVal = -1
Case acLBGetValue
varReturnVal = aData(row, col)
Case acLBEnd
CleanUp:
Erase aData
End Select
GetList = varReturnVal

End Function

The function is what's known as a callback function and is called repeatedly
by Access to fill the list box when the form is opened, passing a different
argument each time.

Ken Sheridan
Stafford, England
 
J

Joan Wild

You can open the linked table in the frontend (dismiss the message); view the properties window - the description property will tell you the full path.

You can actually delete the description, close and save the table, and the path will be displayed in the database window in detailed view.
 

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