Never mind. I figured it out. Even though the activate event occurs before getfocus on instantiation, the page set in the activate event predominates.
BTW the quoted code was an old version and does not contain the pageframe reference, though of course the working code does,
Thanks
>I have a form on which I change the active page in the forms GotFocus event if certain conditions are met.
>
>I use code like the following
>
>DODEFAULT()
>IF ll_isfirsttime AND ll_user_wants_second_page as default
> THISFORM.ACTIVEPAGE=2
> THISFORM.PAGE2.SETFOCUS()
>ENDIF
>
>The second page does indeed become the activepage.
>The next line it hits is the Read Event.
>
>The first page becomes the active page.
>
>According to the trace window, there is no code between the code I've quoted and the READ EVENT.
>
>If I put a wait window or suspend after the above code, the form is indeed at the second page -- until the form is given a resume, at which point the first page becomes active.
>
>Does this seem weird to anyone but me?
>
>Thanks
Thanks
Gar W. Lipow