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

x
?
Solved

How do i do select all record from dbgrid

Posted on 1998-09-10
3
Medium Priority
?
161 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 400 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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

598 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