?
Solved

Using True DB Grid Pro 5, how do I read data from multiple selected records?

Posted on 1998-10-09
2
Medium Priority
?
257 Views
Last Modified: 2013-12-26
Hi all,
I am using TDBG Pro 5 which is bound to a data control which in turn is bound to an Access 97 database. When I select multiple rows on the grid I would then like to be able to get the information from each of the selected records. At the moment I can only get the information from the current record. I tried this

    With TDBGrid1.SelBookmarks
        While .Count > 0
            Label1.Caption = Label1.Caption & CStr(Data1.Recordset.Fields(0))
            .Remove 0
            Data1.Recordset.Bookmark = TDBGrid1.Bookmark
        Wend
    End With

but it just added the same field of the same record for however many records were selected.
Thanks in advance.
0
Comment
Question by:scotslad
[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 Comments
 
LVL 1

Accepted Solution

by:
CarlosJac earned 400 total points
ID: 1487557
Try this:

Dim i As Long

For i = 0 To TDBGrid1.SelBookmarks.Count - 1
    TDBGrid1.Bookmark = TDBGrid1.SelBookmarks(i)
    Label1.Caption = Label1.Caption & TDBGrid1.Columns(0).Text
Next i

Good luck
0
 

Author Comment

by:scotslad
ID: 1487558
Top notch man. It is so simple I should kick myself for not getting it. It's always the
simple ones staring you in the face that cause you problems. Thanks again. Top marks
to you.

Dave.

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

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

762 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