Franco,
I tested the code with a pageframe that didn't contain any objects, sorry.
Another simple workaround is to put a shape object that covers the pages 3-8 and simply set the visible property of the shape. I just played with a simple form and it works quite well:
ON KEY LABEL F9 _screen.activeform.shape1.visible = NOT _screen.activeform.shape1.visible
HTH
>I already tried with the pagecount but when i put the pagecount to 2 and then back to 8 it loses all the controls and all the properties and instead of it is the default page. it is like you created 6 totally new pages.
Daniel