Get the Value from the Previous Record
There are various ways to get the previous/next value. Below is a sample db that demonstrates one. The scenario is a table of vehicle activity, with vehicle number, date and odometer reading. In a query, you want the previous odometer reading along with the current reading for each vehicle so you can calculate how many miles were traveled.
Previous value sample db