Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show as many records as possible in grid!
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01094013
Message ID:
01094165
Views:
12
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform