On Wed, 8 Oct 2008 18:40:00 -0400, Steve wrote:
Is there a way to programatically open a form named "MyForm" in another
Access database in design view and get various properties of the form?
Thanks!
Steve
There is no need to post your question to more than 3 newsgroups!
Indeed, it's seldom necessary to post to more than one group.
I have truncated the groups to 3 in this reply.
Public Sub OpenForeignForm ()
' Run a form in design view located in a different database
Dim appAccess As Access.Applicat ion
Dim strValue1 As String
Dim strValue2 As String
Set appAccess = CreateObject("A ccess.Applicati on")
appAccess.OpenC urrentDatabase "C:\My Household\HomeM aint.mdb"
appAccess.DoCmd .OpenForm "frmMaintai n", acDesign
strValue1 = appAccess.Forms !frmMaintain.Re cordSource
strValue2 = appAccess.Forms !frmMaintain.Fi lter
MsgBox "RecordSour ce is " & strValue1 & vbNewLine & "Form
Filter is " & strValue2
appAccess.Quit
Set appAccess = Nothing
End Sub
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail