Referencing a form in a different database

Dragon

Registered User.
Local time
Today, 04:09
Joined
Aug 26, 2003
Messages
26
I am trying to open a form (and a specific record) in one database from another.

Example:

In database One, I want to click on a button on a form and open a specific form in database Two and filter for a record that corresponds to a field in the form in database One.

That is to say, if I have a record open in database One and that record is for a company called Ajax Widgets, I want to click on a button on that form in database One and open a form in database Two and filter for a record containing Ajax Widgets.

I guess if I can get as far as opening a form in a different database, I should be able to figure out the filtering part.

I have searched the internet and this site to no avail.

I am fairly new to Access so please forgive the non-technical manner in which I phrase this question.

Any and all assistance is welcome and appreciated.

Thanks.
 
Thanks. I currently am able to open database Two from database One using the code below:

Dim accPath As String
Dim mdbPath As String

accPath = "C:\Program Files\Microsoft Office\Office10\Msaccess.exe"
mdbPath = "G:\Files\Databases\TestDatabase\database_Two.mdb"

Call Shell(accPath & " " & mdbPath, vbNormalFocus)


What I need to be able to do is open a form in database Two from database One.

Again, thank you. :)
 
Is database Two always the same one?
Then try working with a reference to that db (Tools, References) and you can work with the objects of that db.
 
Yes, it is always the same database.

You lost me with the (Tools, References). I don’t see References under Tools. I’m using Access 2002

When you have a moment, can I trouble you to elaborate?

Thanks.
 
quote from Access2002 Help:

To fix [or set] a missing reference, open a module in Design view, and click References on the Tools menu. Then clear the check box next to any missing references and set the references you want.
 
I think you may misunderstand what I am trying to do. I just need to know the verbiage I would use to reference a form in a different Access database from the one I am currently in.

For example, to reference a form called EricsForm that is within the same database I would use something like:

Forms![EricsForm]

What I need to know, is what would I use to reference this form (EricsForm) from a different Access database?

Assume the database that houses the form EricsForm was called BigDatabase. Would I use something like this?

BigDatabase!Forms![EricsForm]

I hope I cleared up my need a little bit.

Thank you all for your help.
 

Users who are viewing this thread

Back
Top Bottom