Mike,

Like I suggested to someone else, maybe if you made a small test version of your program and keep only the absolute minimum code to run the loop above.

You can populate the table with test data and go on from there.

It would make posting the code so much easier to you, as well as for others to spot potential problems in your logic.

Basic and very simple, but it does not work !
That's the sort of stuff we see in signatures here.

Robert

Not as dumb as yesterday!