Avatar of Clive Beaton
Clive Beaton
Flag for Australia asked on

How to apply an action query to a second database.

I have opened a second database which I can update with code.  (.addnew .update, etc.) but how can I do it with a query?

Thanks in advance.
Microsoft Access

Avatar of undefined
Last Comment
Clive Beaton

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Rgonzo1971

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Clive Beaton

ASKER
Thanks, but I should been more clear.  I want to create the query in Query Design and apply the completed query by name.    I was hoping to do something like this:

  Dim dbe As PrivDBEngine, wrk As Workspace, db1 As Database, db2 As Database
   Dim, OutputFilePath As String

   OutputFilePath = "C:\Celebrant Assist V3\CelaRept.accdb"
   Set dbe = New PrivDBEngine
   Set wrk = dbe.Workspaces(0)
   Set db2 = wrk.OpenDatabase(OutputFilePath, False, False)

  '  Run a named querythat updates a table in db2
SOLUTION
Gustav Brock

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Clive Beaton

ASKER
It looks like I can't do what I want to do but points for the effort.
Clive Beaton

ASKER
I give up.  I wanted to award the points to the nexperts but now it seems I can't.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Gustav Brock

?

> I have opened a second database which I can update with code.  ..but how can I do it with a query?

I showed you exactly that.

/gustav
Clive Beaton

ASKER
Thanks for trying.  Sorry I didn't close the question, earlier.