Is it possible to run an update query located in another access database?
Something like?
Code:Dim db,db2 as Database Set db = CurrentDatabase() Set db2 = "My other database location" DoCmd.OpenQuery "RUN A QUERY FROM DB2", , acReadOnly
Is it possible to run an update query located in another access database?
Something like?
Code:Dim db,db2 as Database Set db = CurrentDatabase() Set db2 = "My other database location" DoCmd.OpenQuery "RUN A QUERY FROM DB2", , acReadOnly
no, but you could link the external db table, and import the query to your db,
THEN run the query.
I have seen a lot more than that!Ok, thanks. My database currently has 60 queries and is still growing. Is there any point when it could become a problem?
Queries are not like data, they are just code. So queries themselves do not take up much space.
This code here will do the trick.
Code:Dim wrk As Workspace Dim db As DAO.Database Set wrk = CreateWorkspace("AccessWorkspace", "admin", "", 2) Set db = wrk.OpenDatabase("\\Server\Folder\DB_Name.accdb") db.Execute "qryTest"