Working in Librebase, Windows 7, 32 bit. We record KWH meter reading for a number of meters at monthly intervals. We need to obtain the difference between two subsequent readings for each meter and record the figure in another table. The table records meter identity (int), reading date, record identity (primary key). Short of re-entering previous/last reading also, how can we do this in librebase? Something like Dlookup() function in Access?
Further clarification: I record serially readings from (say) 50 meters each month. Each meter is uniquely identified (through a separate table, foreign key) and each reading has a unique id (primary key), of course the date is recorded too. After entering the data for a month, I need to know (and record in a separate table) each meters consumption. I can obviously sort or filter data by meter identity plus order of reads (and the dates), but there will be gaps (and not necessarily of a fixed number).
Years ago (mid nineties) I worked with dBase 4 & 5 where the data was read into memory variables, skip 1 or skip -1 used to move between rows and a small function used to return the sum or difference which could be recorded in another table if required. Life was simpler!