Solved

How do i do select all record from dbgrid

Posted on 1998-09-10
3
158 Views
Last Modified: 2010-04-30
i want to select all record from dbgrid..i can select dbgrid visibls row all record..how do i do select all record from dbgrid..help me...help me...i'm sorry..i can't English very well....
0
Comment
Question by:greenfeild
[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
3 Comments
 

Author Comment

by:greenfeild
ID: 1434238
Edited text of question
0
 
LVL 14

Accepted Solution

by:
waty earned 100 total points
ID: 1434239
Here are 2 functions : Select / Deselect

Private Sub cmdSelectAllArticle_Click()
   ' *** Select all article
   
   Dim nI            As Integer
   
   dataBalayage.Recordset.MoveFirst
   Do While dataBalayage.Recordset.EOF = False
      DBGridBalayage.SelBookmarks.Add dataBalayage.Recordset.Bookmark
      dataBalayage.Recordset.MoveNext
   Loop
   
End Sub

Private Sub cmdDeselectAllArticle_Click()
   ' *** Clear all bookmarks
   
   Do While DBGridBalayage.SelBookmarks.Count > 0
      DBGridBalayage.SelBookmarks.Remove 0
   Loop

End Sub

0
 

Author Comment

by:greenfeild
ID: 1434240
i'm very appriciate your answer..
Your answer is much useful to me..
thank you..
very very thank you...

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
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…

749 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