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

How open another DB Form in another Access window from current Access

Status
Not open for further replies.

atzsea

Programmer
Jun 1, 2005
49
JP
How can I?

I wish to open another Access Window with and from a current Access Window .

In another word,

I wish to open another Access Form in another Access Window with and from a current Access Form .

Help me.
 
This may be possible via automation??? but why not just import the form you want to open into your current application and link to the tables-queries the form is bound to. then just open it. Will be no different.
 
One way to do it is in he first db set a reference to the 2nd db. In the 2nd db, create a public function that opens a form (see below). Then call the function from the 1st db.

Function OpenAForm(strFormName as String)

DoCmd.OpenForm strFormName

End Funcion
 
What I haved wanted is the very 'reference to the 2nd db'.
But I have no idea on the concrete way for it.

Thank you.
 
From your first db, open a module in design view and select Tools | References and then browse for your 2nd mdb file.
 

I could set reference to 2nd db in 1st db's module as you mentioned.

But I need further instructions.

Thank you.
 
In the 2nd database, create a function as mentioned in my earlier post. For example, suppose you want to open the form FormIn2ndDb which resides in the 2nd database. This function must reside in your 2nd database
Code:
Function OpenAForm(strFormName as String)

    DoCmd.OpenForm strFormName

End Funcion

Call this function from within the 1st database, like this:

OpenAForm "FormIn2ndDb"
 

Exactly. I could do it. Succeeded!
I could find a my_new.
I wish I could explore it further.

You wonderful.
Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top