Thank you John,
I just put the following codes in GotFocus, and it worked.
LOCAL nRecNo
nRecNo = RECNO()
IF nRecNo > 0
GOTO TOP
ThisForm.Refresh
GOTO nRecNo
ThisForm.Refresh
Endif
Cheers,
Ali
>>Hi Everybody,
>>
>>How may I show as many records as possible in a grid when I go to a record let’s say nMyrecord. Right now it only shows the nMyrecord record and the records after that one, so the user might think they are the only records. I want to have nMyrecord as the focused record but be able to see as many records as possible.
>>
>>In the init of my form I have:
Goto nMyrecord
>>
>>Thank you,
>>Ali
>
>Ali, What you need to do is start the form with a record showing that is about 10-15 before the desired one. Then in the gotfocus of the form you can:
>
>goto myrec
>thisform.refresh()
>
>This should put Myrecord in the middle of the grid. Depending on the form and grid this might not always work but most of the time it has for us.
>HTH