>>>>>>>Here is an interesting question. Is it possible to construct a sql-select statement that will return 3 adjacent records with the wanted keyfield in the middle? That is, a specified record WHERE keyfield = lnVal plus the record before and the record after. The 2 boundary records would be for the purpose of identifying the previous and next records for navigation purposes.
Hey! Isn't this a similar problem as pagination?
http://www.utmag.com/ViewPageArticle.aspx?Session=71437178684D6B70564A343D202F6C6A5833686B6172616D4B574333545062756D61513D3DIf you're on the current record and want to go backward or if you're on the current record and you want to go forward, pagination like that works no matter the order.