Opening one Access database from the other

bodylojohn

Registered User.
Local time
Today, 14:27
Joined
Dec 28, 2005
Messages
205
Hello everybody,

I have a question.
I have a button on a form.
When I press that button, another database should be opened.

I tried this:

Dim dbMyDB As Database
Dim rsMyRS As Recordset
Set dbMyDB = OpenDatabase("C:\DocumentenJohnny\Style_be.mdb")
Set rsMyRS = dbMyDB.OpenRecordset("nslArtikel", dbOpenDynaset)

But it didn't work.

Thank you very much in advance...
 
Do you really want to open it or do you want to retrieve data from it? If you want the data, it's much simpler just to link to the tables in your other database.
 
neileg said:
Do you really want to open it or do you want to retrieve data from it? If you want the data, it's much simpler just to link to the tables in your other database.

In addition to the above, if you want to just open it, use hyperlink.
 
Hi everybody,

Thanks for your solutions so far guys.

I just want to open the database.
And I want to do it with code.
A hyperlink looks ugly...hihihihihi...

I hope you guys can help me out.

thanks again...
 

Users who are viewing this thread

Back
Top Bottom