Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub dtGrid_HeadClick(ByVal ColIndex As Integer)
If ColIndex = 6 And rs.RecordCount > 0 Then
If sortord = 1 Then
rs.sort = "lname, fname"
DoEvents
sortord = 0 ' change the sortord
Else
rs.sort = "lname desc, fname"
DoEvents
sortord = 1 ' change the sortord
End If
End If
dtGrid.ClearSelCols
DoEvents
Exit Sub
End Sub
Static Sortord as Integer
...partial code from sub...
Private Sub txtLName_KeyUp(KeyCode As Integer, Shift As Integer)
If Trim(txtLname.Text) <> "" Then
SearchMemberByName
End If
...again, this is part of the Sub...
Public Sub SearchMemberByName()
rs.Find "lname like '" & Trim(txtLname.Text) & "%'", , adSearchForward, 1
If Not rs.EOF Then
BKMRK = rs.AbsolutePosition
racerfound = True
Else
LastNameFound = False
If BKMRK > 0 Then
rs.AbsolutePosition = BKMRK
ElseIf rs.RecordCount > 0 Then
rs.AbsolutePosition = 1
End If
racerfound = False
End If
End Sub
Private Sub dtGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
If dtGrid.SelBookmarks.Count > 0 Then
dtGrid.SelBookmarks.Remove 0
End If
If Not rs.EOF Then
dtGrid.SelBookmarks.Add rs.Bookmark
End If
End Sub
Select Case ColIndex
Case 0 : rs.sort = "lname"
Case 1 : rs.sort = "fname"
Case 2 : rs.sort = "street"
End Select
DoEevents
rs.sort = dtGrid.Columns(ColIndex).DataField & " asc"
DoEvents