Popup a form in database A from database B

S

Sheryl

I want to popup a form in database A.mdb from database B.mdb, and use it to
execute further operations in A.mdb. I've already successfully run macros
and queries in A from B by creating an application object 'app', opening
database B, and executing commands like 'app.doCmd.RunSQL myQuery'. But when
I try 'app.doCmd.OpenForm myForm', nothing happens (perhaps it pops up and
down too fast to see).
 
A

Andi Mayer

I want to popup a form in database A.mdb from database B.mdb, and use it to
execute further operations in A.mdb. I've already successfully run macros
and queries in A from B by creating an application object 'app', opening
database B, and executing commands like 'app.doCmd.RunSQL myQuery'. But when
I try 'app.doCmd.OpenForm myForm', nothing happens (perhaps it pops up and
down too fast to see).

You can't use it direct.
put this Sub into a module in A

Public Sub openAForm (FormName as string)
doCmd.OpenForm FormName
end Sub


If you expect an answer to a personal mail, add the word "manfred" to the first 10 lines in the message
MW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top