Solved

How do i do select all record from dbgrid

Posted on 1998-09-10
3
153 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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 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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now