* easiest way might be to go backwards through the cursor * this is not thoroughly tested select date, amount, .f. as redFlag ; from table1 order by date ; into cursor reportTemp ** if using VFP7 or later, add READWRITE clause to the above SELECT, ** and remove the following 5 lines.... if used("reportCursor") use in reportCursor endif use dbf("reportTemp") alias reportCursor in 0 again select reportCursor *********** end of optional VFP6 code goto bottom ldDate = reportCursor.date if amount < 0 replace redflag with .t. endif skip -1 do while not bof() if ldDate <> reportCursor.date and amount < 0 replace redflag with .t. endif ldDate = reportCursor.date skip -1 enddo>Let's say I have a table with 5 records: