FOR lni = 1 TO .oRS1.RecordCounttry
local lnRecordCount lnRecordCount = .oRS1.RecordCount FOR lni = 1 TO lnRecordCountDoing like this, instead of reading the RecordCount property in every single iteration of the loop (what has the COM overhead), you just read it once, and then just read a memvar in the iteration. That might help.