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.Application
Dim strValue1 As String
Dim strValue2 As String
Set appAccess = CreateObject("Access.Application")
appAccess.OpenCurrentDatabase "C:\My Household\HomeMaint.mdb"
appAccess.DoCmd.OpenForm "frmMaintain", acDesign
strValue1 = appAccess.Forms!frmMaintain.RecordSource
strValue2 = appAccess.Forms!frmMaintain.Filter
MsgBox "RecordSource 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