Hi,
Somehow, yes.
Say the form is under database db22.mdb, assume it is Form1, and that Form1
HAS CODE behind it ( it won't work with a "light form").
In a module of db22, have:
==================
Option Compare Database
Option Explicit
Public Function Form1Factory() As Form_Form1
Dim x As Form_Form1
Set x = New Form_Form1
x.Visible = True
Set Form1Factory = x
End Function
==================
Now, open db20.mdb. Add db22.mdb in the "References" for the project ( Use
the Browse button, change the file type for *.mdb, locate and select
db22.mdb)..
You can then, in db20, use Form1 of db22 like this:
=====================
Option Compare Database
Option Explicit
Public Sub Testing()
Dim y As Object
Set y = db22.Form1Factory()
MsgBox "Hi"
End Sub
====================
Note that if y goes out of scope, at the end of the function, the form
closes, so, we need the MsgBox to "stop" the execution of the program.
Hoping it may help,
Vanderghast, Access MVP