VB and set of Data bases

L

le Nordiste

Bonjour,

I have a set of databases.
Each database has a VB procedure to launch the database queries.

These databases are used in sequence :
Database_3 needs data from tables generated in database_2,
who in is turn needs data from tables generated in database_1.

Is it possible to launch VB procédures of database_1 and database_2
from database_3 ?
And how to perform this job ?

Thanks in anticipation for your help.
le Nordiste
 
A

Arvin Meyer [MVP]

Yes, but it will use far fewer resources to combine them in a single
database. That said, to do what you want, you build a public function in a
standard module which does what you want. Then set a reference to it in the
second database and build a function in that database to call it. Now, I've
only personally done it with 2, but I would imagine that you just repeat the
procedures with 3 or more until you run out of resources and crash the
machine.

You can also run queries without using VB, just call the second query from
the first:

SELECT *
FROM [C:\DatabasePath\Database2.mdb].qryWhatever;

Notice the square brackets around the path.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access


Bonjour,

I have a set of databases.
Each database has a VB procedure to launch the database queries.

These databases are used in sequence :
Database_3 needs data from tables generated in database_2,
who in is turn needs data from tables generated in database_1.

Is it possible to launch VB procédures of database_1 and database_2
from database_3 ?
And how to perform this job ?

Thanks in anticipation for your help.
le Nordiste
 
D

David W. Fenton

Yes, but it will use far fewer resources to combine them in a
single database. That said, to do what you want, you build a
public function in a standard module which does what you want.
Then set a reference to it in the second database and build a
function in that database to call it. Now, I've only personally
done it with 2, but I would imagine that you just repeat the
procedures with 3 or more until you run out of resources and crash
the machine.

There's also Application.Run, which can run functions from another
database without needing a reference set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top