I am not sure if this is what you are looking for but...
lnPK = table.pk
locate for table.pk = lnPK
if eof()
go top
endif
grid.refresh()
>Is there a best practice technique for preserving the visual POSITION of the current record in a grid after the grid's record source has been updated with a a fresh set of records.
>
>For example, if the current record in a grid is displayed in visual row 4 of 10 rows and I update the grid's record source, how do I make sure that the current record remains in visual row 4 after the refresh. (This assumes that the current record remains in the record set and that each record has a primary key to seek on)
>
>I'm thinking that I need to use some combination of ActiveRow, RelativeRow and possibly the DoScroll() to fine the visual position.
>
>Any thoughts on doing this in a generic manner?
>
>Thanks,
>Malcolm