Subject Re: GRID NAVIGATION
From Mustansir Ghor <mustan31@hotmail.com>
Date Fri, 14 Jul 2017 14:44:31 -0400
Newsgroups dbase.getting-started

Dear Andy

I re checked. Actualy when we click on the 1st field in the grid then it works fine but if we click left to the 1st field then set focus does execute followed by focus returns on grid

Regards
Mustansir

Andy Taylor Wrote:

> Mustansir,
>
> Don't know why your navigation does not reset the focus correctly on your subsequent navigations...
> Are you sure that it is not getting caught by the cases?
> Try the following code...
> do case
>    case fields["resulty"]="L"
>       msgbox("Case L fired")
>    case fields["resulty"]="M"
>       msgbox("Case M fired")
>   otherwise
>    form.myentryfield1.setfocus()
>    msgbox("setfocus fired")
> endcase
>
> Hope it helps,
> Andy
>
> > Dear all
> > I am using below funtion fro grid navigation. for the first navigation it stop at entryfield.setfocus. But on subsequent navigation it does but it does not stop there and returns to the grid immidiately.
> >
> > function GRID1_onSelChange()
> >            form.mytext2.text=form.labres1.rowset.fields["item"].value
> >            with (form.labres1.rowset)
> >                  do case
> >                         
> >                   case fields["resulty"]="L"
> >          
> >                   case fields["resulty"]="M"
> >
> >                   otherwise
> >                   form.myentryfield1.setfocus()
> >
> >                  endcase
> >                 endwith
> >     return
> ...form snipped....
> >
> > Anybody can see the error
> > Best Regards
> > Mustansir
>