>>>The ActivePage prior to this line of code = 3.
>>>
>>>THISFORM.pgfLevel.ActivePage = 1
>>>
>>>The ActivePage after that line of code = 3.
>>>
>>>Why?
>>
>>Could it be that there is something preventing activating the page? Any code in some controls valid or in the Page.Activate method or some other places? Do you have error handler in place?
>
>What could prevent it?
NODEFAULT in Page.Activate or Valid of some controls on the active page returning false. Or some code in thisform.Refresh() or thisform.Activate trying to set focus to some object on another page. These are quick things that come to mind, could be hard to figure this out.
Put
try
thisform.pgFrame.ActivePage = 3
catch...
endtry
And run this code in debugger to see what exactly is being called here.
If it's not broken, fix it until it is.
My Blog