473,789 Members | 2,781 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1616
cb****@duclaw.c om 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.Paren t.PublicPropert yOrMethod

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.MyPr op)

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
1277
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 WhatEver Dim frmB As New Form '-- The New Form to display frmB.TopMost = True frmB.Owner = CType(Parent, Form) frmB.Show() End Sub
25
10268
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 data in each record, which includes the ID of the father and the mother (who also have records in the table). One record per form. I have a Tab Control in the form, and in one of the tabs I have a subform (sfmSiblings) in which I wish to list...
2
2610
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 form. How do I get the two to talk to each other?
1
1525
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" compiler error. The mdi parent form is the startup object. I should be able to access the startup object in my other modules, but I cannot find the startup object's name. Does anyone have suggestions?
2
2340
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 open it in the new 97 database: "Microsoft Access has encountered a problem and needs to close. We are sorry for the inconvenience. If you were in the middle of something, the information you were
8
5259
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 hours now. I have a DirectoryInfo on my parent form: (extra bits chopped out...) public partial class frmMain : Form { public DirectoryInfo diTemp;
0
1599
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 MDIParent property like this: Form1 ^parentForm = (Form1 ^)this->MdiParent; where Form1 is the parent's class. Then use parentForm to get the arraylist variable. Currently, this code is implemented in another header file from which Form1 is...
4
2038
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 (tblServiceVisits). When the code from my subform attempts to update controls on the parent form (i.e. refresh the date to the current date and change the status of the work order) I get a write conflict error. To clarify, I'm getting the error as soon as...
0
1837
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 as-- surname, name, DOB. This form is linked to child form ( based on another table. we will call this- child table )the linking field for two tables is unique ID. child form also contains fields - surname, name and DOB and other fields unique to...
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10408
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6769
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.