DbEngine

lamx0063

New member
Local time
Yesterday, 16:26
Joined
Jan 25, 2008
Messages
4
Hi all,

This forum is awesome, I consult this from time to time to find a hard to solve issue.

Anyway, my current issue that I have trouble with is:

I have 2 access databases, DB1 and DB2, they reside on shared drives. I would like to open DB2 using VBA to retrieve data tables from BD1. I am using createworkspace with DbEngine, but it could not logon to DB2. Can someone help me with this topic. I read a tons of createworkspace and DbEngine online and in the help file, but no luck. Thanks.
 
Can you simply link to the tables?
 
except link table, you can export DB1 related tables to DB2 when you open DB2.
 
Just use this:

Code:
Dim db As DAO.Database

' Opens the database
    Set db = OpenDatabase("YourPathToYourDatabaseFileHere")
 
Thanks for the answers, all are good. However, I left a small portion out of my question to get a quick reply.

Here is my situation:
I have a database the will access to many other databases, some are secured and some are not, therefore using linked tables will work, but not ideal. What I want to do is every time a user chose the inputs, I will go out to that particular database and pull the data and manipulate the data to display the results. Hence why I asked about dbengine.

Thanks for the help.
 
DBEngine

Out of curiousity why wouldn't u just use the Get External Data Function and Link to the Tables (Simple and Quick to me)?
 

Users who are viewing this thread

Back
Top Bottom