>Sure, no problem. But the bad news is that although I submitted a report on the error and repro code to MS, the problem was not fixed and still exists in VFP 9. I believe it was introduced in VFP 8 - running the code under VFP 7 should produce the expected results. I consider this a serious error since it involves a record pointer movement not specifically instructed by the program or initiated by the user, but for some reason the VFP team did not fix it. I don't know if it fell through the cracks or they just decided it wasn't serious (I would have a hard time fathoming that conclusion!).
>
>>>If you'd like to see a form that reproduces this problem, go to the Downloads section and type in "Campbell" in the last name field. The only item that will come up is the sample form I submitted. It is based solely on VFP base classes and has only enough code to reproduce the problem (and it has instructions on how to reproduce it).
>>>
>>Got it... But might take a few days before I can take a hard look at it.
>>
>>regards
>>
>>thomas
It is simple to workaroud this bug:
LPARAMETERS nKeyCode, nShiftAltCtrl
if nKeyCode = 13
thisform.pgfMain.page1.SetFocus
thisform.pgfMain.page1.click()
nodefault
return
endif
Why ? A bug on the pageframe.
When you set ActivePage = 1, the VFP push the focus in a stack like mode ( like for a toolbar );
when you return into the page2, grid control the recordsource, and the grid move the record pointer.
With Page.SetFocus this don't happen.
Rule: don't set ActivePage
Fabio