By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,996 Members | 896 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,996 IT Pros & Developers. It's quick & easy.

How do I automate 2 Access db's

P: n/a
dog
I'm looking for some help.

I have 3 Access 2002 db's. Access1, Access2 & Access3.

I need to write some code in a module in Access1 which will:

Open my Access2 db and Import some tables into it which are in the
Access3 db.
Im a bit stuct because the transferdatabase method only alows me to
import into the current db and not into another.

Any help would be much appreciated.

Many Thanks
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Take a look at CopyObject in the Help in the module window.

Larry Linson
Microsoft Access MVP

"dog" <do*********@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
I'm looking for some help.

I have 3 Access 2002 db's. Access1, Access2 & Access3.

I need to write some code in a module in Access1 which will:

Open my Access2 db and Import some tables into it which are in the
Access3 db.
Im a bit stuct because the transferdatabase method only alows me to
import into the current db and not into another.

Any help would be much appreciated.

Many Thanks

Nov 13 '05 #2

P: n/a
dog
Larry. Thanks for your help.

I took a look at the 'CopyObject' but the problem was that, the source
object always has to be in the currentdb. It wouldn't allow me to get
a source object from a different db. I found a way round by using
'TransferDatabase' which would import the object I wanted, then export
it.
My next problem is that I wanted to execute a query which lives in my
db, but would affect records in another db. I'm currently looking at
using ADO but it's getting messy.

"Larry Linson" <bo*****@localhost.not> wrote in message news:<3k24d.5102$Co1.3261@trnddc02>...
Take a look at CopyObject in the Help in the module window.

Larry Linson
Microsoft Access MVP

"dog" <do*********@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
I'm looking for some help.

I have 3 Access 2002 db's. Access1, Access2 & Access3.

I need to write some code in a module in Access1 which will:

Open my Access2 db and Import some tables into it which are in the
Access3 db.
Im a bit stuct because the transferdatabase method only alows me to
import into the current db and not into another.

Any help would be much appreciated.

Many Thanks

Nov 13 '05 #3

P: n/a
dog wrote:
Larry. Thanks for your help.

I took a look at the 'CopyObject' but the problem was that, the source
object always has to be in the currentdb. It wouldn't allow me to get
a source object from a different db. I found a way round by using
'TransferDatabase' which would import the object I wanted, then export
it.
My next problem is that I wanted to execute a query which lives in my
db, but would affect records in another db. I'm currently looking at
using ADO but it's getting messy.


If you link the tables into the database, you could just use a few simple
queries to add/update/delete data. The only problem here is that you can't
change the table structure. Is that a problem?
Nov 13 '05 #4

P: n/a
dog
Thanks for the advice. I've gone down this route and done exactly
this. Linked in the tables, run a few queries then deleted the links.

I thought the ADO route would be my first try but turns out that
that's the long winded way and linking tables was far simpler, and
probably more efficient.

Many Thanks

Christopher Lewis <ch******@cox.net> wrote in message news:<tKh4d.42831$ni.8945@okepread01>...
dog wrote:
Larry. Thanks for your help.

I took a look at the 'CopyObject' but the problem was that, the source
object always has to be in the currentdb. It wouldn't allow me to get
a source object from a different db. I found a way round by using
'TransferDatabase' which would import the object I wanted, then export
it.
My next problem is that I wanted to execute a query which lives in my
db, but would affect records in another db. I'm currently looking at
using ADO but it's getting messy.


If you link the tables into the database, you could just use a few simple
queries to add/update/delete data. The only problem here is that you can't
change the table structure. Is that a problem?

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.