open a database from another database

P

pat67

I wan to open other databases from a macro in one database. I can't
seem to find the command. Can someone help?

Thanks
 
P

pat67

P

pat67

Thanks. I will try one of those.- Hide quoted text -

- Show quoted text -

In the command line what do i need to put besides the path? Entering
just the path did not work. I get an error saying the path is invalid
or a component is missing. The path is correct because if i copy it to
explorer it opens the database with no problem.
 
A

Arvin Meyer

I got the same result. I guess you cannot use a macro to start another
instance of Access. I never to use macros anyway so I'll have to suggest
that you copy the code from:

http://www.mvps.org/access/api/api0018.htm

into a standard module, and save the module with a name like basUtilities
(anything but the function name) then call it from a command button like:

Sub cmdWhatever_Click()
Dim x
x = fHandleFile("C:\Your Path To\YourFile.mdb", WIN_NORMAL)
End Sub
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.accessmvp.com
http://www.mvps.org/access
Co-author: "Access 2010 Solutions", published by Wiley


Thanks. I will try one of those.- Hide quoted text -

- Show quoted text -

In the command line what do i need to put besides the path? Entering
just the path did not work. I get an error saying the path is invalid
or a component is missing. The path is correct because if i copy it to
explorer it opens the database with no problem.
 

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