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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,546
Messages
6,114,251
Members
448,556
Latest member
peterhess2002

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
Back
Top