Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 1998-10-09
2
Medium Priority
?
258 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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

604 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