| Database Programming Techniques > Accessing Cell Data > Retrieving a bookmark relative to a displayed row |
To retrieve a bookmark relative to a row that is currently displayed, use the RowBookmark method, which accepts an integer offset that specifies a zero-based row number ranging from 0 to VisibleRows - 1:
| Example Title |
Copy Code
|
|---|---|
Dim Bmk As Variant
With TDBList1
Bmk = .RowBookmark(0) ' First displayed row
Bmk = .RowBookmark(1) ' Second displayed row
Bmk = .RowBookmark(.VisibleRows - 1) ' Last displayed row
End With
|
|
Note that unlike the GetBookmark method, the RowBookmark method only returns bookmarks for visible rows.