Results 1 to 4 of 4
  1. #1
    TBcontroller is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    9

    Question Linking a Query to Another Database.

    I am trying to link a query that is ran in another database to my current database. I really do not want to copy the query and its underlying tables over to my current database.



    I have done it successfully by using : SELECT [Powertrain Surcharge].*FROM [Powertrain Surcharge] IN '\\vcn.ds.volvo.net\vpt-hag\proj09\011605\Country of Origin\2017 Calculations\Q3\Powertrain Cost Base\NAFTA 2017 PWT Q3.accdb';

    However, my intent is to run a query off of this query. Every time I do, it crashes. (referenced database is closed)

    In reading online, there is another way to do it, but I am not great at SQL code and I am not able to make heads or tails of it.

    SELECT [predicate] { * | table.* | [table.]field1 [AS alias1] [, [table.]field2 [AS alias2] [, …]]} FROM tableexpression [, …] **[IN externaldatabase]** [WHERE… ] [GROUP BY… ] [HAVING… ] [ORDER BY… ] [WITH OWNERACCESS OPTION]

    Does anyone know of a better way to do this? Or can anyone dummy down this code?

    Thanks,
    TB

  2. #2
    TBcontroller is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    9
    So, I'm pretty sure I found out its the same code- just more extensive for field options.

    How can I keep Access from crashing after it is Linked?

  3. #3
    Join Date
    Apr 2010
    Location
    Steamboat Springs
    Posts
    2,529
    If your query is running against only one table, why not link your table in DB2 to DB1 and then run the query in DB1.

  4. #4
    TBcontroller is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2017
    Posts
    9
    Hi Alansidman,

    If it were, I wouldn't have an issue. The query in DB2 is ran off another query and that include 6 or 7 tables.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. A database with Linking Tables
    By djclntn in forum Queries
    Replies: 1
    Last Post: 03-14-2012, 05:04 PM
  2. Replies: 3
    Last Post: 09-07-2011, 03:17 PM
  3. Linking Database to Website
    By FadingAPE in forum Programming
    Replies: 5
    Last Post: 12-02-2010, 01:27 PM
  4. Replies: 4
    Last Post: 11-10-2009, 04:36 PM
  5. linking audio to database
    By sean in forum Access
    Replies: 0
    Last Post: 09-13-2009, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums