Solved

Control Array

Posted on 2002-04-11
6
175 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 59
Add a task in Outlook from access 11 42
SQL VB connection works in one PC and doesn't in another 15 68
clicking a shape in a frame array vb6 3 47
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

829 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