Linked Table value

Discussion in 'Microsoft Access External Data' started by hmlim, Jul 7, 2003.

  1. hmlim

    hmlim Guest

    Hi, all
    anybody know how to get a linked table path value using VBA code?
    I have a table is a linked table, inside my VBA code, I need to know
    where the external source for linked table, can anybody help?


    hmlim
     
    hmlim, Jul 7, 2003
    #1
    1. Advertisements

  2. Here is some DAO code that will do waht you need:

    Dim db As Database
    Dim varTable As Variant
    Dim strTableName As String
    Dim strFileAndPath As String
    Set db = CurrentDb
    For Each varTable In db.TableDefs
    If Len(varTable.Connect) > 1 Then 'its a linked table
    strTableName = varTable.Name
    'linked tables start with ";DATABASE="
    'so we need to strip that away
    strFileAndPath = Mid(varTable.Connect, 11, Len
    (varTable.Connect) - 10)
    End If
    Next
    Set db = Nothing

    -Cameron Sutherland

    >-----Original Message-----
    >Hi, all
    > anybody know how to get a linked table path value

    using VBA code?
    > I have a table is a linked table, inside my VBA code,

    I need to know
    >where the external source for linked table, can anybody

    help?
    >
    >
    >hmlim
    >
    >
    >.
    >
     
    Cameron Sutherland, Jul 7, 2003
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Cheow Wang

    Linked Table Manager or Table Properties

    Cheow Wang, Jul 25, 2003, in forum: Microsoft Access External Data
    Replies:
    1
    Views:
    3,816
    Douglas J. Steele
    Jul 25, 2003
  2. Dave Fernandez

    Pivot Table Wizard in Access fails w/ linked table

    Dave Fernandez, Aug 21, 2003, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    594
    Dave Fernandez
    Aug 21, 2003
  3. Tim Heames

    Linked Table Manager does not display linked tables

    Tim Heames, Jan 13, 2004, in forum: Microsoft Access External Data
    Replies:
    2
    Views:
    1,262
    Joan Wild
    Jan 14, 2004
  4. Guest

    How do I convert a linked text file table, into an access table

    Guest, Oct 18, 2005, in forum: Microsoft Access External Data
    Replies:
    2
    Views:
    737
    John Nurick
    Oct 20, 2005
  5. Don

    Linked Table Manager Not Showing List of Linked Tables

    Don, Oct 18, 2005, in forum: Microsoft Access External Data
    Replies:
    4
    Views:
    5,361
  6. Guest

    I cannot modify a linked table in access (linked to excel).

    Guest, Apr 29, 2006, in forum: Microsoft Access External Data
    Replies:
    3
    Views:
    3,852
    Guest
    Apr 30, 2006
  7. Guest

    Linked table Manager; how can I automate changing of the linked ta

    Guest, Jul 7, 2006, in forum: Microsoft Access External Data
    Replies:
    2
    Views:
    919
    Guest
    Jul 7, 2006
  8. Guest

    extracting data from linked db2 table using access make table quer

    Guest, Aug 29, 2006, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    423
    Guest
    Aug 29, 2006
Loading...