Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 opening a form in another database - VBA

Author  Topic 

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2005-08-25 : 03:25:59
OK, so you can open a form in design mode in the current database by using
Docmd.OpenForm bla, acViewDesign
This is useful for analysing the form in VBA...

But how do you do this when the form is in another database?

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2005-08-25 : 09:26:54
I believe you will need to create a new instance of an Access.Applicaiton object, open up the other database, call DoCmd.OpenForm against that instance, and then grab a hold of the Form object from there. Perhaps keep everything invisible if you like.

Go to Top of Page

rrb
SQLTeam Poet Laureate

1479 Posts

Posted - 2005-08-28 : 19:46:40
Thanks once again Dr Cross works ok for what I need.

Ta

--
I hope that when I die someone will say of me "That guy sure owed me a lot of money"
Go to Top of Page
   

- Advertisement -