• Link/Unlink table from one Access app to another

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Link/Unlink table from one Access app to another

    Author
    Topic
    #465991

    I know how to dynamically link and unlink tables from SQL Server in Access, but am stuck on how to do the same thing from one Access app to another. Not sure what connection method to use, etc. for example, Link SQL Server table into access like so:

    Code:
                Dim tdf As DAO.TableDef
                Dim CONSQLSVR As String
        
                CONSQLSVR = "ODBC;Driver=SQL SERVER;SERVER=;UID=;PWD=" & Password & ";Database=;"
    
                Set tdf = CurrentDb.CreateTableDef("dbo_")
                tdf.Connect = CONSQLSVR
                tdf.SourceTableName = "dbo."
                
                CurrentDb.TableDefs.Append tdf

    As you can see, i use ODBC to load a table and CreateTableDef to give it a name when loading. Not sure how to do the same thing in Access; I suppose it should be a lot simpler?

    TIA

    Viewing 1 reply thread
    Author
    Replies
    • #1205680

      Hi Steve,
      Are you wanting to link to tables in another Access database, or are you wanting to link SQL Server tables to another Access database?

    • #1205688

      Problem solved – issue no longer relevant. Thanks!

      I want to link to tables in another Access database – thanks!

    Viewing 1 reply thread
    Reply To: Link/Unlink table from one Access app to another

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: