Here's a copy of a stripped down version of my capx.
When it counts off in the database the x variable works fine. The Y seems to lose a digit. It should be everytime the y variable passes the number of records variable the y should reset back to the stsrting y position. But it resets back to the y position + 1 instead. I'm sure it's something relatively easy but with a lack of sleep I can't seem to place my finger on it.