Solved

Control Array

Posted on 2002-04-11
6
178 Views
Last Modified: 2010-05-02
Hello
in one of form i have frame control and in frame there is two text box. i have created control array for that frame control . so how can i access the text fields on different frame. because right now text boxes have same name on all frames.
Thanks,
shri
0
Comment
Question by:shrihalbe
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 3

Expert Comment

by:Bahnass
ID: 6934402
U will have Index property
0
 
LVL 18

Accepted Solution

by:
mdougan earned 30 total points
ID: 6934411
Normally, I'd say try to qualify it with fraFrame1(0).Text1.Text, fraFrame1(1).Text1.Text etc.  but I really doubt that you can have two textboxes on the same FORM with the same name, even if they are one different frames without creating a control array of the textboxes too.  If this is the case, then just use the index for the textbox, as I don't think that you could qualify them with the Frame name as coded above.

0
 

Author Comment

by:shrihalbe
ID: 6934429
Hello mdougan,
  i have two different textbox in one frame. so that in one frame there are two different text boxes.  but i want to access the same text box frm different frame then how can i do that.
THanks,
shri
 
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Bahnass
ID: 6934484
if I Understand U just want to change container

set text1.container = fram1
0
 
LVL 18

Expert Comment

by:mdougan
ID: 6935058
I'm not sure what you mean by "you want to access the same textbox from different frame".  If a textbox sits on a frame or not on a frame or on a different frame, it doesn't matter in the code.  As long as all textboxes and frames and whatever are all in the same Form (window).  All of you code is being coded in the Form's code section.  So, if you want to refer to text1 or text2 in the code in the form, all you have to do is say:

Text1.Text = "Hello"
Text2.Text = "World"

Now, if by "frame" you actually mean "Form" (window), then you do need to qualify the name of the textbox like this:

(say that this code is inside of Form2)

Form1.Text1.Text = "Hello"
Form1.Text2.Text = "World"

A "Frame" is the name of the panel or container that people use to group related controls.  It usually has a square border and a caption at the top.  If this is not what you mean by "frame" let us know.
0
 

Author Comment

by:shrihalbe
ID: 6942663
thanks
shri
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month6 days, 3 hours left to enroll

626 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