Solved

Where can find the index of controls that you place in Data Report???

Posted on 2002-04-02
4
167 Views
Last Modified: 2010-05-02
i need to find the index of every control, eg: textbox, label etc that i use in data report, but i can find it no where, do anyone know how to find the index of control in data report??
0
Comment
Question by:jescho
[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
4 Comments
 
LVL 3

Expert Comment

by:msterjev
ID: 6912492
You dont need index.Just use Collections.You can use For ... Each statement:

For Each control In rpt.Controls
 'Check the kontrol Name,Caption, and set the
 'desired properties
Next
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 50 total points
ID: 6912593
Well, msterjey given a hint for you, though it does not seem to work.

Try this:

    Dim ctl
    Dim sect
   
    For Each sect In DataReport1.Sections
        For Each ctl In sect.Controls
            MsgBox ctl.Name
        Next
    Next

0
 

Author Comment

by:jescho
ID: 6916879
Actually i also using the similar way to find out the index of control in report. but i just wonder is there any part of the VB can see the index without using coding.
0
 
LVL 9

Expert Comment

by:Valliappan AN
ID: 6916982
I dont understand what you mean. I dont think you could have an index to controls in Datareport, I mean a control array cannot be done, if I am right.

>>but i just wonder
is there any part of the VB can see the index without using coding.

What do you mean by this?

And any part. reason that you graded 'B', please read the guidelines for EE, since they dont recommend grading B unless, you expected some more, and that you did not get it enough answer or what.

Thanks for the points.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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
Course of the Month8 days, 11 hours left to enroll

615 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