Solved

Control Array

Posted on 2002-04-11
6
172 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
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…
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…

743 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

11 Experts available now in Live!

Get 1:1 Help Now