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!

Linked MDE's

Status
Not open for further replies.

hirenJ

Programmer
Dec 17, 2001
72
GB
HI all, I have an access app that is broken down into 3 MDE's...

I have a "main menu" form from which the user can access the other MDE's ....

How can I open up another MDE from the current MDE workspace?

Note: no data is being passed between these MDE's..

thanks ppl

:eek:)

Hj
 
Lookes like you will have to link the tables from the var. mde to your mde.
Check for one table in each of the conn. mde if the table is not available then open your attachment form and ask the user to point the the missing mde.

Ken Getz once wrote a module called "FileOpen" that does this trick - the code is found in:

' Microsoft Access 95 How-To
' Ken Getz and Paul Litwin
' Waite Group Press, 1996

I have the code but I am not alowed to distribute acc to the rights mentioned in this code.
 
It sounds like you want to invoke forms, reports, module functions, etc., in the other MDEs from the main menu MDE. Is that correct? If so, a simple way to accomplish this is to:

1) Add the Project Names of the other MDEs to the References list in the main menu MDE.
2) In each of the other MDEs code a "Public" function (use the same function name in each MDE) to launch forms, reports, etc. that are found in the MDEs.
3) In the main menu, use the other MDEs Project Names to prefix the same named launch function.

For example, each of the other MDEs would have a similarly coded launch function named "OpenObject." Then, in your main menu program:
Code:
MDEx.OpenObject(sObjName, iObjType, sObjParams)
where "MDEx" represents which one of the other MDEs you want to use. The commonly named OpenObject" function in each MDE is then responsible to open forms, reports, etc., that are found in that MDE.
 
Im not quite sure if I know what you mean --
i basically have a main menu, when the user click on a menu option id like to current database to close, and the selected MDE to open... they both dont even have to be open simultaneously -- or called from within each other...

what would this public function look like?


thanks for you help!

Hj

:eek:)
 
Using the method I described you don't Open and Close databases. They are all part of one, big project by way of the References list in the main program. The main program uses the "CurrentDb" as its default database. The other referenced programs each refer to themselves by way of the "CodeDb" database, not the "CurrentDb" database.

If you really want to open and close databases, there are several ways to do that, depending on your requirements. You should look at the Access online help on the topics of "OpenCurrentDatabase" and "Application Object" for ideas.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top