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

How to open another Access database form 1

Status
Not open for further replies.

EBee

MIS
Aug 10, 2001
229
US
How do you open another MS Access database form from your current form. And, using a button on the current form. I tried the button wizard and it only opens .exe files.

Thank you.
 
Hi
If you mean open a form from another database, you could use code something like this:
Code:
Dim acApp As Access.Application
txtFilename = "C:\MyMDB.mdb"
Set acApp = CreateObject("Access.Application")
acApp.OpenCurrentDatabase txtFilename
acApp.Visible = True
acApp.DoCmd.OpenForm "Employees"
But it is not very satisfactory, because you are opening another instance of Access, which could be confusing. Is this the kind of thing you were thinking of?
 
Why not just use "Hyperlink Address property" of the Command Button?


________________________________________
Zameer Abdulla
Visit Me
Minds are like parachutes. They only function when they are open. -Sir James Dewar (1877-1925)
 
Remou, your code is exactly what I need. It's even a plus that it opens another instance of Access.

Have a star!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top