Opening multiple databases at the same time in Access 2007

J

JXC

I can't seem to open two databases (e.g. test1.mdb and Northwind.mdb) at the
same time when I use Access 2007. I am able to open multiple databases when
I use Access 2003. I am not sure which setting I need to modify in Access
2007.

Thank you in advance.
 
G

George

There should be no reason for you not to be able to open two databases with
Access 2007, by starting two instances of Access and opening the accdb's in
each of them respectively.

But a more detailed explanation might help. WHat does happen? You can open
an instance of Access and then load an accdb. THen you start a second
instance of Access and try to load a second accdb. What happens at that
point?

If you reverse the order in which you try to load the accdb's, do you have
the same problem?

Does this occur what any accdb?

In other words, some diagnostic analysis might help point you to the problem
and possible resolution.
 
J

JXC

Thank you for your quick reply. Sorry, I can open multiple dBs
manually;however, I was trying to open a second database programmically from
my current database using the following subroutine that I found in the Help
section :

Sub DisplayForm()

Dim strDB As String

' Initialize string to database path.
Const strConPathToSamples = "C:\Program " _
& "Files\Microsoft Office\Office11\Samples\"

strDB = strConPathToSamples & "Northwind.mdb"
' Create new instance of Microsoft Access.
Set appAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.
appAccess.OpenCurrentDatabase strDB
' Open Orders form.
appAccess.DoCmd.OpenForm "Orders"
End Sub

When I run this program in Access 2003, it opens the second dB, but not when
I run it in Access 2007. No error messages are displayed.

Thanks
 
A

Albert D. Kallal

JXC said:
Thank you for your quick reply. Sorry, I can open multiple dBs
manually;however, I was trying to open a second database programmically
from
my current database using the following subroutine that I found in the
Help
section :

When you browse to that folder and click on the northwind.mdb, do you see
any prompts during startup?

Do you see the bar about content having been disabled?

I would for testing set macro security to low.

office button->access options->trust center.

On the right side select trust center settings

on the left side, now select macro settings.

Choose the enable all macros (bottom on).

Now, exit access, and then re-load and try again....

Also, keep in mind that your code will not work with the runtime edition of
ms-access....
 
J

JXC

Thank you. That solved the problem.

Thank you all for help !



Set appAccess = _
CreateObject("Access.Application")
' Open database in Microsoft Access window.

appAccess.Visible = True

appAccess.OpenCurrentDatabase strDB
' Open Orders form.
appAccess.DoCmd.OpenForm "Orders"
 

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