Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skipping in grid avoiding BOF/EOF
Message
 
 
To
02/07/2009 09:23:12
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01409731
Message ID:
01409733
Views:
58
>I am using a grid to display different records from a table. I have the grid narrowed down to only showing records that match the account I am looking at. I also want to show them all, but show the last 7 of them initially. Here is how I set that up:
>
>WITH pmtinput.grid1
> GO BOTTOM in (.recordsource)
> SKIP -7 IN (.recordsource)
>ENDWITH
>
>Is there a way to get a count on how many records are showing in the grid? Basically at times I get less than 7 records and hence with the grid limited, it goes BOF. I want to put in a check for BOF, but I am not sure if it will function the same manner as it does with skipping in tables. Any ideas?

Well, you can always use COUNT command.

Also, you can do your SKIP in a loop.
local lnI

for i = 1 to 7

   if not bof(.recordsource))
        skip - 1 in (.recordsource)
   endif
next
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform