devxlogo

Highlighting a Row in a Bound DBGrid

Highlighting a Row in a Bound DBGrid

To highlight the row containing the active cell in a bound DBGrid,add the record set’s current bookmark to the grid’s SelBookmarkscollection:

 Private Sub DBGrid_RowColChange _         (LastRow As Variant, ByVal LastCol As Integer)        If datCtl.Recordset.RecordCount Then                DBGrid.SelBookmarks.Add _                         datCtl.Recordset.Bookmark        End IfEnd Sub

devx-admin

Share the Post: