Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2015
    Posts
    1

    Unanswered: Update Linked Tables from ODBC

    Hi All,

    Can anyone help me on how to automatically update the link table from an ODBC?

    Thanks in advance!

  2. #2
    Join Date
    Oct 2014
    Posts
    268
    Provided Answers: 6
    Code:
    Dim myDb As DAO.Database
    Dim myTbl As TableDef
    
    Set myDb = CurrentDb
    Set myTbl = myDb.TableDefs("dbo_tbl")
    
    myTbl.Connect = "ODBC;DRIVER=SQL Server;SERVER=<ServerName>;APP=Microsoft Office 2003;" _
    & "Trusted_Connection=Yes;DATABASE=<Database_Name>"
    
    myTbl.RefreshLink
    myDb.TableDefs.Refresh
    End Sub

Posting Permissions

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