>I have seen references to the ActiveForm property as well as the ActivePage property. Is there such a thing as ActivePageFrame? I want to be able to loop through all the objects in a page on a page frame without having to know the actual page frame name. For now I have to have code with the specific frame name hard coded as in
>
>
>WITH _SCREEN.ActiveForm.pfrData.Pages(_SCREEN.ActiveForm.pfrData.ActivePage)
> For lCtlNum = 1 TO .CONTROLCOUNT
> ..Code that checks each control
> EndFor
>ENDWITH
>
>
>Any suggestions? Have I missed something obvious?
Larry,
You might be able to use the ActiveControl property of the ActiveForm. This holds an object reference to the currently active control. If the control is on one of the pages, you can get its grand parent (pageframe) by using the ActiveControl.Parent.Parent. If the baseclass of the ActiveControl is a Page, you only have to go to the Parent level.
With containership you may have to drill out until you find the pageframe. If you drill out and find the form first, you know there was no active pageframe because the user was not in the pageframe.
HTH.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao