Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 763021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:29:34+00:00 2026-05-14T16:29:34+00:00

I have an Access 2003 database MDB where all of the tables exist as

  • 0

I have an Access 2003 database MDB where all of the tables exist as linked tables within SQL Server 2005. The MDB file contains all of the ODBC information that points to the correct SQL Server and log-on credentials (trusted connection).

What I would like to do is add a new linked table to the MDB file however I am not sure how to go about specifying the ODBC connection information. When I try to add a new linked table I keep getting prompted to locate or create a DSN file. I don’t want to have to create a new DSN entry on every machine, rather I would like all that information stored within the Access MDB file itself.

In the existing database I can “hover” over the table names and see the ODBC connection info as a tool-tip. All I need to do is add another linked table using the same connection information.

I do have access to the SQL Server where the tables are linked to,. I have already created the new table I wanted to add. I just need to find a way to link to it.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:29:35+00:00Added an answer on May 14, 2026 at 4:29 pm

    You can use the connection string from an existing table, or you can do something like:

    ''This is a basic connection string, you may need to consider password and so forth
    cn = "ODBC;DSN=TheDSNName;Trusted_Connection=Yes;APP=Microsoft Office 2010;DATABASE=TheDatabaseName;"
    

    There are a few was to connect a table:

    sLocalName = "TABLE_SCHEMA" & "_" & "TABLE_NAME"
    
    With CurrentDb
        If DLookup("Name", "MSysObjects", "Name='" & sLocalName & "'") <> vbNullString Then
            If .TableDefs(sLocalName).Connect <> cn Then
                .TableDefs(sLocalName).Connect = cn
                .TableDefs(sLocalName).RefreshLink
            End If
        Else
            ''If the table does not have a unique index, you will neded to create one
            ''if you wish to update.
            Set tdf = .CreateTableDef(sLocalName)
            tdf.Connect = cn
            tdf.SourceTableName = "TABLE_NAME"
            .TableDefs.Append tdf
            .TableDefs.Refresh
        End If
    End With
    

    This will produce a message box if the table does not have a unique index

      DoCmd.TransferDatabase acLink, "ODBC Database", cn, acTable, "TABLE_NAME", sLocalName
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an Access 2003 database that connects to a SQL Server 2008 box
I have used Access 2003 to develop a frontend to a SQL Server database.
I have an Access 2003 database using MS-JET linked tables (that is, there are
I have been successful in querying a Microsoft Access 2003 database (.mdb file) and
I am upscaling an access 2003 database to SQL Server Express 2008. The tables
I have an Access database (in Access 2003) with several tables, and data must
So I have an access mdb file that was originally create using Access 2003/Office
I have an MS Access 2003 Database with more than 60 tables and 120,000
I have a Access 2003 database that will dynamically load MDB databases as a
I have some access applications that connect to a SQL Server database. The applications

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.