reading out path for table link

petko

Registered User.
Local time
Today, 19:55
Joined
Jun 9, 2007
Messages
89
Hello All,

I have a question but its rather difficulties to put it on paper as I don't know the exact terms. I try my best, please help if you can.

I have a PC in our office on which I have all the tables of the db. Users are connected to these tables by linked (or attached?) relation from their on their pc. One of the pcs (a laptop) is taken away sometimes from the net and the user works offline: he sets the link (attachment) to his own C drive manually in this case where a copy of the tables are located.
I have a task where a condition should be checked if the user is attached to his own C: drive or to the office network. What I would like to do is to read out the link path. Can I do this somehow with a code?

Appreciating your help

Peter
 
See if this little piece of code can get you started.
Code:
Public Function ShowTables()
   Dim I As Integer

   With CurrentDb

      For I = 0 To .TableDefs.COUNT - 1
         If Len(Trim(.TableDefs(I).Connect)) > 0 Then
            Debug.Print .TableDefs(I).Connect
            Debug.Print .TableDefs(I).SourceTableName
         End If
      Next
   End With

End Function
 
Last edited:
That's doing exactly that I was looking for.
Thanks a lot for your help!
 

Users who are viewing this thread

Back
Top Bottom