>>Rich,
>>
>>The trick here is to activate page 3 of the pageframe and then setfocus to the textbox. Put this in the click event of the cmddegridadd button and try it.
>>
>>
>>IF NOT DODEFAULT()
>> RETURN .F.
>>ENDIF
>>
>>With This.Parent.Parent
>> .ActivePage = 3
>> .Page3.txtThing.SetFocus()
>>EndWith
>>
>
>Rats. I've seen a similar solution work for a different similar problem (when I wasn't using a framework), so I really thought you were onto it.
>
>Unfortunately, it didn't work. Focus still goes to the page 2 grid, instead of page 3.
Whoops! My bad! I didn't read your code closely enough.
I had put in:
>>
>>With This.Parent.Parent.Page3
>> .Activate()
>> .txtThing.SetFocus()
>>EndWith
>>
instead of what you said.
Switching to your (correct) code did the trick!
Thanks,
Rich Addison, Micro Vane, Inc., Kalamazoo, MI
Relax, don't worry, have a homebrew.
- Charlie Papazian, The New Complete Joy of Home Brewing