Visit our new web pagesWe have launched a new extended set of web pages at www.alvechurchdata.co.uk. These old pages will stay on the server because people still have links to them but they will not be updated. The new version of this page is at www.alvechurchdata.co.uk/hints-and-tips/fox101scan.html. |
||
Home About us Development Training Support |
VFP Tutorial - Scan ... EndScan loopA scan loop processes records in a table. The commands within the loop are executed once for every record in the current work area:
*-- The staff table holds managers and employees
Use Staff In 0 *-- Modify salaries and bonuses Scan If Title = 'manager' *-- More money for managers Replace Salary With Salary * 1.10 Replace Bonus With 10000 Else *-- No rise or bonus for the other employees Replace Bonus With 0 EndIf EndScan The code in this example will modify every record in the Staff table and reward the managers. NotesThis example shows how one control structure can be embedded within another. The If structure is executed once for every record in the table. Back to FoxPro program control . Introduction | Environment | Project | Tables | Forms | Navigation | Executable |
Hints & tips
The textbox class in Visual FoxPro 9 has a new Autocomplete
property which shows the user the previous values that have
been entered in that textbox.
More...
|