Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Control Array

Posted on 2002-04-11
6
Medium Priority
?
179 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 120 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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

715 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