I have a do loop code that prints records from a database to the screen. In my code I want to compare the current value of a field with the previous record value i.e. record1 = 8 and record2 = 9. At the beginning of my code, I declared a variable to be equal to the database field, and have concluded that this is working OK by printing it to screen. In my loop code I do a calculation which is <BR><BR>If record2 - record1 = 0 Then<BR>Response.Write "This record is not different"<BR>End If<BR><BR>At the end of the loop I set the value of record1 to the value of record2, which I thought would then carry that value over to the new loop. However, when I print record1 to screen, it maintains the same value as the first record in my recordset. Does anyone know how I would correct this?