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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go from one Access project to another in VBA code

Status
Not open for further replies.

cmmrfrds

Programmer
Feb 13, 2000
4,690
US
Can anyone give me the code that opens another Access Project and closes the current project. What I have tried doesn't seem to work. It opens the adp but doesn't change the current window to the new project.

Dim appAccess As Access.Application
Dim filePath As String

Set appAccess = Access.Application

' Open Access project.
filePath = "C:\localpubs.adp"

Set appAccess = New Access.Application
appAccess.OpenAccessProject filePath
Debug.Print " file path = "; filePath
Debug.Print " access app = "; appAccess.CurrentProject.Name

Thank you,
Jerry


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top