Solved

Control Array

Posted on 2002-04-11
6
173 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now