Open another database from the current database

D

Daniel Pineault

There are a couple of way to do this, but the easiest would simply be to use
the Application.FollowHyperlink Method as it can/will open any file
(including mde).

So try something like
Application.FollowHyperlink "YourFilePathAndFileName"

ie:
Application.FollowHyperlink "C:\database\family.mde"
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
F

fredg

Can I make a button to open another mde file from the currently open mde file?

If the current database is an .mde database you can not make
modifications to it's design.

If the current database is actually an .mdb database, then add a
command button to a form and code it's click event:
Application.FollowHyperlink "C:\SomeFolder\DatabaseName.mde"
 
J

Jeff Boyce

You've asked a "how" question, as in "how do I open another database..."

Why? What will having another database open allow you to do?

I ask because there may be other solutions to your problem, but I don't
understand what that is...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
S

slickdock

Thank you Daniel. Of course, you understood that I am the developer making
changes to the mdb file then distributing the resulting mde file to users. I
have the additional snag that I need to reference startup options, due to
/wrkgrp security, /user and /x macroname when this mde file launches. I tried
including that in your FollowHyperlink command, within and outside the final
quote, but I get errors. What is the proper way to reference these startup
options?
 
D

Daniel Pineault

Since you wish to specify command line switches, I think you'll need to use
the Shell Command. Take a look in the help file for all the details and
examples or search this forum and you'll find lots of examples on its usage.
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
S

slickdock

Thank you so much! Got it going, but it needs some fine tuning. Maybe when
you see my ultimate objective, you may start me down another path, or a path
other than the Shell command...

Here's how it successfully opens:

Shell SysCmd(acSysCmdAccessDir) & "MsAccess.Exe " _
& """C:\Program Files\MyApp\MyApp_fe.mde "" /wrkgrp ""C:\Program
Files\MyApp\secured.mdw"" /user operator"


1. It opens, but does not become the active window. I have to alt-tab to get
to it. How can I make it the active window?

2. It opens, but not maximized. How can I make it open with a maximized
window?

3. The doozie: How can I carry a value from the current form in DB1 to the
newly opened DB2?
 

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