By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,491 Members | 1,868 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,491 IT Pros & Developers. It's quick & easy.

Open A Specified Form In Another Database In Design View

P: n/a
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
Oct 8 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
Oct 8 '08 #2

P: n/a
"Steve" <no******@nomsense.comwrote in message
news:ef******************************@earthlink.co m...
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?
Yes.

Oct 9 '08 #3

P: n/a
yeah

add the code

docmd.openform "myform"

to whatever control you want to open the form

hope this helps

Regards
Kelvan
Oct 9 '08 #4

P: n/a
"Lord Kelvan" <th********@hotmail.comwrote in message
news:b1**********************************@v39g2000 pro.googlegroups.com...
yeah

add the code

docmd.openform "myform"

to whatever control you want to open the form

hope this helps

Regards
Kelvan
Or just ask PC Datasheet, he's so great that you can go to him if no one
here can help and his fees and quite modest ;-)

Oct 10 '08 #5

P: n/a
On Fri, 10 Oct 2008 08:40:37 +0100, Keith Wilby wrote:
"Lord Kelvan" <th********@hotmail.comwrote in message
news:b1**********************************@v39g2000 pro.googlegroups.com...
>yeah

add the code

docmd.openform "myform"

to whatever control you want to open the form

hope this helps

Regards
Kelvan

Or just ask PC Datasheet, he's so great that you can go to him if no one
here can help and his fees and quite modest ;-)
Keith, did I miss something here?
Is this Steve that Steve?

--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Oct 10 '08 #6

P: n/a
"fredg" <fg******@example.invalidwrote in message
news:vj****************************@40tude.net...
On Fri, 10 Oct 2008 08:40:37 +0100, Keith Wilby wrote:
Keith, did I miss something here?
Is this Steve that Steve?
Hi Fred,

The evidence "no******@nomsense.com" to me suggests that he is.

Oct 13 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.