Results 1 to 4 of 4

Thread: Get Linked Tables file path ***RESOLVED

  1. #1

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Get Linked Tables file path ***RESOLVED

    Access may have linked tables.

    I want to determine what the linked tables address or file path is from my VB application. Any idea how I could get this?
    Last edited by Avatarp; Oct 23rd, 2003 at 11:53 AM.

  2. #2
    Hyperactive Member
    Join Date
    Sep 2001
    Location
    San Jose, Ca. - USA
    Posts
    302
    if your using DAO then the TableDef object has two important properties.

    Connect: is the path to whatever file your mdb is linked to usally it looks like this ";Database =C:\Folder\Filename.mdb".

    SourceTableName: this is table name within the linked database.

  3. #3

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    I'm not using DAO...

    I am using the OpenRecordset on a opened database:
    Code:
        Dim dbMyDB As Database
        Dim rsMyRS As Recordset
    
        Set dbMyDB = OpenDatabase(frmEOIFINDERMAIN.txtReportsManager)
        Set rsMyRS = dbMyDB.OpenRecordset("Directories", dbOpenDynaset)
    Could you give me an example of how to us DAO to get what I need? Thanks frigginjerk

  4. #4

    Thread Starter
    Fanatic Member Avatarp's Avatar
    Join Date
    Sep 2002
    Location
    Calgary
    Posts
    826

    Solved it...

    Code:
        Dim dbMyDB As Database
        Dim rsMyRS As Recordset
        Dim tbdef As TableDef
    
            Set dbMyDB = OpenDatabase(frmEOIFINDERMAIN.txtReportsManager)
            Set rsMyRS = dbMyDB.OpenRecordset("Directories", dbOpenDynaset)
            Set tbdef = dbMyDB.TableDefs("BrokerCash")
    
            LinkedTableString = tbdef.Connect
            LinkedTableString = Mid(LinkedTableString, 11, Len(LinkedTableString))
            frmEOIFINDERMAIN.txtLinkedTable.Text = LinkedTableString
    This works grat for me. I us the Mid function to trim out the ";DATABASE=" character from the string

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width