?
Solved

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

Posted on 2002-04-02
4
Medium Priority
?
168 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
  • 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 150 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

755 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