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

Posted on 2002-04-02
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??
Question by:jescho
  • 2

Expert Comment

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

Accepted Solution

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


Author Comment

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.

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.

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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 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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 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