Good day good people.
I have to build a query that takes the value in the last row and from that,
deduct the value in the same recordset from 13 records before. The problem is
that i can not use the record ID field to refer to in a Dlookup as the record
ID's are not in sequence as the data is filtered according to specific
criteria.
Any ideas are welcome.
Regards.
I don't know for sure if this will work in your case, but it is possible to
create a Numbered Query that dynamically creates a "record number" for each
row. On my website (www.rogersaccesslibrary.com), is a small Access
database sample called "NumberedQuery.mdb" which illustrates how to do this.

Signature
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
> Good day good people.
> I have to build a query that takes the value in the last row and from
[quoted text clipped - 9 lines]
>
> Regards.
VanmaN - 20 Jun 2007 15:02 GMT
Thank you Roger,
This works like a charm. I can now get the value i need using dlookup in
conjunction with your sample. Great stuff.
By the way, very usefull samples on your site. Definate bookmark in my
Favourites.
> I don't know for sure if this will work in your case, but it is possible to
> create a Numbered Query that dynamically creates a "record number" for each
[quoted text clipped - 14 lines]
> >
> > Regards.
Roger Carlson - 20 Jun 2007 15:18 GMT
Great. I'm glad that worked.

Signature
--Roger Carlson
MS Access MVP
www.rogersaccesslibrary.com
> Thank you Roger,
>
[quoted text clipped - 25 lines]
>> >
>> > Regards.