How do I retrieve the previous and next rows in an Access database usng a query?
Posted on 2008-06-23
I have a database that lists a large amount of production jobs for the my company. I order the rows by job number, but I was wondering how to accomplish this task with a query so I could end up putting all this information on a report.
What I want to do is grab the previous and next row's job number of the row that is currently populating the report.
For example, if I am looking at the report for job number 5, I want to put fields on the report that would list the previous and next job number in the database (maybe 4 and 6). This is so the user knows where the jobs was and where it is headed.
What would be the best route to accomplish this task?