473,441 Members | 2,054 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,441 software developers and data experts.

Parent Form Access

I have two forms Main & Child. Main has several readonly properties
that I would like to access from the child form. How do I reference
the MDI-Parent form MAIN and use those properties.

Nov 23 '05 #1
3 1581
cb****@duclaw.com wrote:
I have two forms Main & Child. Main has several readonly properties
that I would like to access from the child form. How do I reference
the MDI-Parent form MAIN and use those properties.


if you set the parent property (it may be set automatically not too
sure) of the child then you can access it though:

Childform.Parent.PublicPropertyOrMethod

Then you just need to make a method or property to allow you to do what
you want.

Chris
Nov 23 '05 #2
No luck on that one, Chris. Doesn't see the properties.

Nov 23 '05 #3
cbrown,

On the mdi-child form, dimension a variable of type mdi-parent form:

Dim frm As mdiMain

Then assign the mdi-child form's MDIParent to the variable:

frm = Me.MdiParent

Now access the properties. For example, if the mdi-parent form has a
property named MyProp:

MsgBox(frm.MyProp)

Kerry Moorman
"cb****@duclaw.com" wrote:
I have two forms Main & Child. Main has several readonly properties
that I would like to access from the child form. How do I reference
the MDI-Parent form MAIN and use those properties.

Nov 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joseph | last post by:
What am I missing form this method that will prevent access to the parent form when the frmB is active? If you run this method, you can still access the parent form and its functionality. Sub...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
2
by: Susan Sullivan | last post by:
How can I change properties of a child form through a parent form? I have a child form with a rich text box. I want to control font properties of the rich text box through a menu on the parent...
1
by: David L Wright II | last post by:
I am trying to access a mdi parent form's properties and methods outside of the mdi parent form's class module. I keep getting "Reference to a non-shared member requires an object reference"...
2
by: carmela_wong | last post by:
Hi all, I have converted a database from Access 2003 to Access 97. Everything gets neatly imported into the new database except for one form which continues to show a fatal error when I try to...
8
by: JonnyBlaze | last post by:
Hi Guys - This is my first C# app, but I have some knowledge of a bunch of languages like VB6 and PHP, so I'm picking it up rather quickly. I've been pulling my hair out on this one for about 4...
0
by: ppotter10 | last post by:
I'm working on an app which uses a parent form and child forms in C++.Net. I want to access a static arraylist variable of the parent form from a child form. In order to do so, I wanted to use the...
4
by: dgunner71 | last post by:
All, I have a Parent form where the Record Source is a query based on three tables (tblcustomers, tblEquipment, and tblWorkOrders). The Parent form has a subform based on a 4th table...
0
by: sudhirb | last post by:
Hello I am using MS Access 2003. I have a parent form based on parent table which contains unique ID field( primary key) which i enter first on the parent form. Parent table also contains fields...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.