Hi All-
I have 2 databases, each with a form and each form has a button...
-dbA
-frmA
-btnA
-dbB
-frmB
-btnB
In database (dbA), form (frmA), I was able to create a button (btnA) that opens a form (frmB) in a different database (dbB).
However, when I click button (btnB) in frmB, dbB closes immediately. When I click btnB in dbB when opened without using btnA, it runs the select query I have assigned to it.
Any thoughts?
Here is the VBA for btnA:
Code:
Public Sub Command1_Click()
Dim appAccess As Access.Application
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "I:\myLocation\dbB.accdb"
appAccess.DoCmd.OpenForm "frmB"
Set appAccess = Nothing
End Sub