Thanks cavac for bestowing your wisdom upon me. The script runs almost a minute faster on the 20K recordset I am using to test. Prior to your suggestion the script was taking 3minutes 15seconds, and now it runs in 2min 20 seconds. A very significant improvement.