top of page

Query Reference to Remote Database Fails

ree

Description

You get an error message with a query or SQL text that refers to a remote Access database, e.g. using an IN clause: SELECT * FROM Table1 IN 'd:\Foo\Some.accdb' or direct notation: SELECT * FROM [d:\Foo\Some.accdb].[Table1]


The most common error message is: "Operation is not supported for this type of object." If you try to run the query/SQL from VBA, this is runtime error 3251. The problem can happen within Access or in a different program like Excel that tries to get data from an Access database. Some forum discussions:


Microsoft Q&A

Stackoverflow

AWF


Cause

Microsoft has increased the security measures with regard to the execution of queries in remote databases. An optional registry key for this was already introduced in 2021 with KB5002984. The Windows security update KB5072033 from December 9, 2025, changed the default value of this registry key to block the access to remote databases. If this key does not exist in the registry, some variants of remote query execution are now blocked and result in error messages.


Status

Microsoft is aware of the issue and is working on a solution for the most common scenarios related to Access.


Workaround 1

Check whether the registry key described in KB5002984 exists on your system and has the value 0 (=block). If so, you can set it to 1 to allow remote execution of queries. If the key does not exist, you can create it and set it to 1, as described in the KB article.


Workaround 2

If the problem occurs from within Access, it should help to declare the database with the external reference as Trusted (or set "Allow all macros").


Workaround 3

If you do not have the necessary permissions for the other workarounds:

Another method to avoid the reference to remote databases in Access queries/SQL is to use linked tables. So instead of using a SQL text like mentioned in the Description section above, you can create a link to Table1 in d:\Foo\Some.accdb, and then use the local linked table in your query or statement: SELECT * FROM Table1

If you need to reference different tables dynamically you can create or modify the link with VBA code using methods like TransferDatabase and RefreshLink.



If you encounter a variation of this problem, feel free to describe your specific issue in a comment on this article so that we can inform Microsoft about it.

bottom of page