Jolene,
You shouldn't use ZOrder() for this, it's function is for something quite different. Also a pageframe always remembers what the last selected page was. If you want to programatically changes pages set the ActivePage property.
>I have a form that contains a pageframe. That pageframe contains a pageframe and finally that pageframe contains a pageframe. When one of the tabs on the third pageframe is clicked and then you click back on one of the tabs on the first pageframe, if you go back to click on the third it doesn't default to the first tab on that third pageframe. I included a Zorder() command on the tab of the first pageframe that contains the second pageframe and now anytime I click on the second pageframe (doesn't matter which tab), it automatically orders the tabs for me. I put the Zorder() command in the click event for that tab and it seems that anytime I click on a tab of the pageframe on that parent tab, it executes the code I have there for the click event. Is there another way around this?