Get the value from previous row and use it current row field in Access Query
Posted on 2014-11-07
Hi I have query in access where I have a table that has fields Item, Date Req, Required, Available that is grouped by Item, ordered by Date Req field.
I like to get a field "Previous use" which will be the previous record value from the required field, except when it doesn't have one for the group, item. For example I like to see the result as follows
Item Date Req Required Available Previous Use
Abc 11/1/14 100 600 0
Abc 11/3/14 200 600 100
Abc 11/10/14 100 600 300 ( 100 +200 which is before 11/10/14)
CCC 11/2/14 200 700 0
CCC 11/5/14 300 700 200
I will appreciate if somebody can let me know how I can do this access query.