Try the RAND() function.
From the VFP help file for RAND( nSeedValue ):
"RAND( ) returns the same sequence of random numbers if you use the same seed value for nSeedValue the first time you issue RAND( ) followed by subsequent RAND( ) function calls without nSeedValue.
If nSeedValue is negative the first time you issued RAND( ), a seed value from the system clock is used. To achieve the most random sequence of numbers, issue RAND( ) initially with a negative argument and then issue RAND( ) without an argument.
If you omit nSeedValue, RAND( ) uses a default seed value of 100,001."
>Does anyone know how to generate a random number in VFP?
>
>Thanks
>
>Jim
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN
If a vegetarian eats vegetables, what does a humanitarian eat?