Database development and training for Birmingham and the midlands
Specialists in Microsoft Access and Visual Foxpro database training and development
I am happy to hear from existing clients but I am taking no new calls.
Visual Basic and Visual FoxPro For Next loops
VBAFor, Step, Exit For, Next
VFPFor, Step, Loop, Exit, Next, EndFor
Common Syntax Notes
This is another structure where there is very similar syntax in the two languages.
FoxPro used to end the structure with an EndFor but Visual FoxPro now accepts the VBA syntax Next clause as an alternative:
Both languages also have a For Each structure for working with arrays and collections.
Use the Loop keyword to skip the rest of the code in the FoxPro loop and return immediately to the test in the For statement. Use the Exit command to break out of the loop and execute the statement following Next.