Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open new Access window/database?!?

Status
Not open for further replies.

Beren1h

Technical User
Jul 19, 2001
104
US
I'm trying to open new database (with the access window maximized) from a different database. My code:

Dim appAccess As Object
Dim str As String

str = "C:\My Documents\Projects\CTM.mdb"

Set appAccess = CreateObject("Access.Application")

With appAccess
.OpenCurrentDatabase str
.Visible = True
End With


It opens the CTM database, but it flashes on the screen for a second and then seems to close. Also I don't see how to open it with the access window maximized.

Any help?

 
I just dropped your code into a test mdb and it worked fine (with appropriate changes to the name of the mdb to be opened). You may have some other code that is closing the newly opened mdb. Are you trying to close the mdb that opened the new one? You may be referencing the wrong mdb if you are. "The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"
 
There is no other code. I was playing around with this to see if it would work. I'm not closing the orginal database or anything.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top