The following example opens the customer
table and lists the company name one page at a time until the end of the file is reached or you until you choose Cancel.
CLOSE DATABASES
CLEAR
OPEN DATABASE (HOME() + "samples\data\testdata")
USE customer
GO TOP
local recCtr, btnValue
recCtr = 0
btnValue = 1
DO WHILE btnValue = 1 AND NOT EOF()
? "Company : " + company
recCtr = recCtr + 1
if (recCtr % 20) = 0 then
btnValue =MESSAGEBOX ("Click OK to continue, ;
Cancel to quit.",33)
clear
endif
Skip 1 && Move down one record
ENDDO
=MESSAGEBOX("Listing complete.",48)