Count Selected record in datasheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bibi9475
    New Member
    • Jun 2012
    • 1

    Count Selected record in datasheet

    Hi everyone, I'm new here

    I work in access 2003 and i'm searching since too much time how to count the number of lines selected by the user in datasheet view

    Does anyone have an idea to do so ?
  • MMcCarthy
    Recognized Expert MVP
    • Aug 2006
    • 14387

    #2
    On the MouseUp Event of the form put the following code ...
    Code:
    Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Dim RowCount As Integer
    
        RowCount = Me.SelHeight
        Msgbox RowCount, vbOKOnly
    
    End Sub
    For example, if you select row 3 and drag the mouse to row 7, then the Msgbox will popup with 5.

    Comment

    Working...