Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enabling/Disabling nav buttons?
Message
From
31/07/1997 12:28:03
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, United States
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00042628
Message ID:
00042631
Views:
32
>I was adding a new property to my next and previous navbuttons: Skipsize. Skipsize determines how many records are skipped when the buttons are clicked. This is useful for grids in which you want to move the record pointer a page at a time. The problem I forsee is determining how many records to the beginning or end of a table. For example, if you are at record 90 of a 100 record table and skipsize is 12, the next record it will go to will be 102. Obviously this is incorrect. So, I simply did a reccount - current record and if that is less than skipsize I go to EOF. However, I don't think this will work if there is a filter on the table. Any ideas on a better way to approach this?


Mike,

The only time skip will give you an EOF error is if you are already at EOF/BOF. Issing a skip 12 from 90 will put you at EOF. So then after the skip, check for EOF and then issue a SKIP -1 to put you on the last record.

HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...
Previous
Reply
Map
View

Click here to load this message in the networking platform