I have a form that contains a page frame consisting of 5 pages. On page 1 I
have a grid that is linked to the child data.
On page 2 I have a command button that calls a form method that positions
the cursor back to the first text box on page 1. When page 1 gets the
focus, the grid still shows the child data, however, the scroll bar is
disabled and the row highlight bar will not move. When I click on different
cells in the grid, they will change to another color. It is like the record
pointer is not being moved or the relationship in the grid is lost.

The code in the command button is:
SELECT posinvoice
thisform.pfPOS.pgItems.setfocus()
thisform.pfPOS.pgItems.cntItem.getsku.setfocus()
There is no code in the setfocus methods of each control.

Has anyone experienced this or do you know what may be happening.
Thanks in advance.
John.

Re: Strange Behavoir in Grid in VFP8 by John

John
Thu Sep 11 14:46:44 CDT 2003

I figured out that I must set the ActivePage property to 1.

SELECT posinvoice
thisform.pfPOS.ActivePage = 1
thisform.pfPOS.pgItems.cntItem.getsku.setfocus

The grid works properly.
Why doesn't VFP automatically change the activepage property when
"thisform.pfPOS.pgItems.SetFocus" is issued?
John


"John G." <obs@earthlink.net> wrote in message
news:oV18b.700$%G3.175@newsread2.news.atl.earthlink.net...
> I have a form that contains a page frame consisting of 5 pages. On page 1
I
> have a grid that is linked to the child data.
> On page 2 I have a command button that calls a form method that positions
> the cursor back to the first text box on page 1. When page 1 gets the
> focus, the grid still shows the child data, however, the scroll bar is
> disabled and the row highlight bar will not move. When I click on
different
> cells in the grid, they will change to another color. It is like the
record
> pointer is not being moved or the relationship in the grid is lost.
>
> The code in the command button is:
> SELECT posinvoice
> thisform.pfPOS.pgItems.setfocus()
> thisform.pfPOS.pgItems.cntItem.getsku.setfocus()
> There is no code in the setfocus methods of each control.
>
> Has anyone experienced this or do you know what may be happening.
> Thanks in advance.
> John.
>
>