Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

referencing parent control

Posted on 2002-05-28
4
Medium Priority
?
198 Views
Last Modified: 2010-05-02
I've written a control which is invisible at runtime.

The control itself has nothing but a label on it.

The user interface, which can be invoked by the parent application, consists of two forms within the control.

I need to be able to fire events from code on one of those forms, and to access the control's custom properties. To do this I need to reference the control itself from a constituent form - how is this done?

TIA
0
Comment
Question by:nedrub
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7040429
:)
0
 
LVL 1

Accepted Solution

by:
zzconsumer earned 800 total points
ID: 7041135
If I understand right what you need, you should do the following:

In the form that needs the reference, do the following:

1. Add a private variable of the type your referenced element is of:
private myControl as myControlElement (or whatever)

2. Add a Property to the Form:
Public Property Let TheControl (tControl as myControlElement)
Set myControl = tControl
End Property

3. From somewhere in your Program, use:
Form1.TheControl = TheControlWhichIsVisibleToTheProgramFromHere
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7851211
Hi nedrub,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept zzconsumer's comment(s) as an answer.

nedrub, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:SpideyMod
ID: 7912832
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question