Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skipping in grid avoiding BOF/EOF
Message
 
 
À
02/07/2009 09:23:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Novell 6.x
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01409731
Message ID:
01409733
Vues:
59
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform