Solved

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

Posted on 1998-10-09
2
255 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 100 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

726 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