The text file specification <name> does not exist, when using SQL IN statement to link to external MS Access database.

LucasParker

New Member
Joined
Sep 25, 2014
Messages
2
I am trying to use MS Access to query an MS Access database that is not the current database. I am using:

<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">SELECT [tblA].[fieldA]
FROM [tblA]
IN "G:\path\databaseA.mdb" "Microsoft.ACE.OLEDB.12.0;"
WHERE ((([tblA].[fieldA])="30000"));

</code>Running this query returns the error <code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">Could not find installable ISAM.</code>

I thought the connect string might not be necessary when connecting to another MS Access database (extension .mdb) so I also tried:

<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;">SELECT [tblA].[fieldA]
FROM [tblA]
IN "G:\path\databaseA.mdb"
WHERE ((([tblA].[fieldA])="30000"));</code>

However, this returns the error "The text file specification <name> does not exist. You cannot import, export, or link using the specification."

Does anyone know a way around this?

Thank you for any help,

Lucas

</name>
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,408
Office Version
  1. 365
Platform
  1. Windows
Welcome to the Board!

One way is to create a linked table to the table in the other Access database. Then you can just use this linked table in a query just like you would any other Access table.
 

LucasParker

New Member
Joined
Sep 25, 2014
Messages
2
Welcome to the Board!

One way is to create a linked table to the table in the other Access database. Then you can just use this linked table in a query just like you would any other Access table.


Thanks Joe,

I am trying to do this without creating linked tables. I have to pull and append data from 5 different Access databases with over 10 tables in each database. I need to be able to do this repeatedly with different WHERE conditions each time. That is why I am trying to figure out how to do it with SQL.

Any ideas would be appreciated, as I am relatively new to Access.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,651
Messages
5,838,586
Members
430,557
Latest member
MK15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top