Guest_imported
New member
- Jan 1, 1970
- 0
I'm a VBA newbie. I'm trying to figure out how to open a recordset based on a query (sort order is date/time). I need to move through the record set and compare a field value to the value in the previous record. If the comparison is say less than 12 hours I do a calculation based on that previous value and assign a calculatedvalue to the current record field. If the value is greater I do something else (actually get the value from a lookup in a lookup table). This is due to the fact that the value from the previous record determines the correct value in the current record (iterative loop). I need to go in order because theoretically you could be basing the current record value based upon the results of 2,3,4,....etc. records. Yet, if the interval from the previous record is greater than 12 hours the caculation is from a fresh "start". If your a diver a good example is the calculation of your ending dive group which in some instances is based on the previous dives ending group (you keep building nitrogen loading).
Help would be more than gratefully accepted. Many thanks !!
Help would be more than gratefully accepted. Many thanks !!