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

Open a new DB from Current DB

Status
Not open for further replies.

RobPotts

Technical User
Aug 5, 2002
232
US
Hello,

I'm sure this has been covered before but the search fuction is down. Is there some code which I can assign to a button on a menu which will open another DB. Both databases are secured and are controlled by the same MDW. So I don't want to have retype the username and password in again.

Thanks in advance
Rob! [Bigcheeks]
Process and Procedure are the last hiding place of people without the wit
and wisdom to do their job properly.
 
rob:

The only way to do this, is to use the Shell command in Access and provide a command line with your db, the workgroup file, password and user name in the string. Look in the help file under Command line for the appropriate switchs to set, it would look something like:

Shell("c:\somdir\msaccess.exe c:\dirtwo\mydb.mdb /w c:\dirthree\myworkgroup.mda /user 'smiley' /pwd 'pass'")

There's also a knowledgebase article on this in the support area of the MS web.

mvpacc
 
if you want to be prompted for the database path and filename to open in the same window you could use a "send keys" macro with "%FO"

Of course only one database can be open in each 'instance' of access.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top