473,396 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Open A Specified Form In Another Database In Design View

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
6 6388
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
"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
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter Royle | last post by:
I am working with VB.NET. It has just started losing my design view of a form when I open a project. If the design view was open when I last closed it, the view is there, but the Solution Explorer...
0
by: Eva | last post by:
Hi, i have placed code on my form load event to maximise the form. what i want to know is when im working in design view is there a way to display the actual size of the form?? i ask this...
3
by: I Are Confused | last post by:
I am trying to open Database #2 while in Database #1 and delete a table that is in #2 so that I can copy a table from #1 into #2 - all through a function. My Database #2, as part of the start up,...
1
by: Sylvia S. | last post by:
Hello, I want to make a form based on a table with many records. I used the wizard to make a 'form in table layout'. The wizard is not able to make the form due to too many fields. I discovered...
7
by: Paul T. Rong | last post by:
Hello, Often when I open one form, and (without closing it) open the form in its design view, then all the caption value of the controls in this form remained there in form's design view that is...
14
by: Jan Nielsen | last post by:
Hi In Microsoft Access it is possible to write code like this Sub test() DoCmd.OpenForm "TestForm", acDesign Dim a As Control For Each a In Forms("TestForm").Controls Do stuff Next End Sub
2
by: MLH | last post by:
A97 Am having difficulty displaying graph in Form View that I see fine in graph control on form opened in design view. I know I'm doing something wrong. If I open the form in design view - I...
1
by: colleen1980 | last post by:
I copy a form from another database into my database. I need help how to i link the table which is in another database with that form. Thank you.
2
by: existential.philosophy | last post by:
This is a new problem for me: I have some queries that open very slowly in design view. My benchmark query takes about 20 minutes to open in design view. That same query takes about 20 minutes...
2
by: Ryno Bower | last post by:
Hey guys. I'm writing a program and want to do the following. I have a form for the company details called "companydetails". So when I open the database I want the form to display first if the...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.