Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Here we go LOOP-ty LOOP... Here we go LOOP-ty die.
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00207863
Message ID:
00207876
Views:
12
>I have the following loop in the Init of a Form:
>SELECT myfile
>GO TOP
>DO WHILE NOT EOF()
>
> this...
> and...
> that...
>
> SKIP
>ENDDO
>
>I loop until EOF, but then I want to go back to the top of the file and start the loop all over again. What's the best way to do that?
>
>I might also want to add a command button I can press to bail me out of the loop while stuck in the loop. What might that command button look like code-wise?
>
>I am sure I could figure it out, but you people have the coolest solutions to the hottest problems. Here we go loop-ty loop, here we go loop-ty die.
Local lExit
For nLoop=1 to 2
 Select mytable
 GO TOP
 Scan
  IF INKEY()=19 
   lExit=.T.
   EXIT
  ENDIF
 Endscan
 If lExit=.T.
  EXIT
 Endif
Endfor
and add label with caption "Press Ctrl+S to Stop the Process".
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform