Hi Terry
>What? Made MY code more readable or YOURS, you cheeky scamp! <bg>
First I mashed up your code and then made it more readable, so is it your code or mine which I made more legible <g>.
>I don't know if my soln would have worked OK, with the recursion and all, but at least it put you on the right track.
Nay, actually it had the same problem as my code, you can't assign a number to activepage which is disabled. So .pgf.ACTIVEPAGE = lnNextPage won't work.
>Personally, if you've read any of my rants, I'd never use EXIT or LOOP, so my version of yours would have been something like:
>
>Do while not llGotFreePage
>
Okay I'll mod the code. Thanks.
>the thing also about bracketing your code with "With thisform etc." is
>1. things like IIF()s can be more readable
Agreed and shorter.
>2. VFP doesn't have to keep continuously searching the object hierarchy to find the one to which you're referring
That should also speed up things, that's nice, frankly didn't know it.
>Incidentally, I don't think your function ever WILL return lnNextPage as you use the evil EXIT to get out as soon as you've got a free page.
Well EXIT just exits the latest loop, if I remember correct and plus this thing seems to work !?!
>"Stick with me, kid, and you'll be wearing diamonds"
Wow, I'd love that. Had recently visited the U.K. in May, should have know earlier, I would have come back with diamonds <g>.