Hi,
I am having problems opening a form in a standalone second access DB using the the following code - I am able to open the second access DB but get an error indicating that ' The command or Action OpenForm isn't available now' - Run time error 2046.
Private Sub Command21_Click()
Dim strPathName As String
Dim stdocname As String
strPathName = "H:\Projects DB\PO KPI.mdb"
OpenADatabase (strPathName)
End Sub
Public Sub OpenADatabase(ByVal strPath As String)
Set appAccess = CreateObject("Access.Application")
With appAccess
.OpenCurrentDatabase strPath
.Visible = True
End With
appAccess.DoCmd.OpenForm "test", acNormal, , , , acWindowNormal
End Sub
Is it possible to open any form in the second database and pass parameters to it (From the first DB?)
Thanks,Priya
I am having problems opening a form in a standalone second access DB using the the following code - I am able to open the second access DB but get an error indicating that ' The command or Action OpenForm isn't available now' - Run time error 2046.
Private Sub Command21_Click()
Dim strPathName As String
Dim stdocname As String
strPathName = "H:\Projects DB\PO KPI.mdb"
OpenADatabase (strPathName)
End Sub
Public Sub OpenADatabase(ByVal strPath As String)
Set appAccess = CreateObject("Access.Application")
With appAccess
.OpenCurrentDatabase strPath
.Visible = True
End With
appAccess.DoCmd.OpenForm "test", acNormal, , , , acWindowNormal
End Sub
Is it possible to open any form in the second database and pass parameters to it (From the first DB?)
Thanks,Priya