........Yes you can use the FOR and WHILE clause in the LOCATE. What happens is only the records matching the initial SEEK value are searched for the Field2 value. So if you have 10 records that matched the first SomeValue, only the next 10 records are searched in the LOCATE. Can't get faster than that.
One question so I make sure I understand you correctly and file this excellent tip away for future use.
You said..... So if you have 10 records that matched the first SomeValue, only the next (10) records are searched in the LOCATE.
Is that the next 10 or is it the next 9..... or does the locate find this first record again. Honest to God I am not trying to be a *SA* I really want to know!
TIA
Tom Gahagan
Alliance
Computer Solutions
"Music, like sex, is much too important to be left to professionals."
Robert Shaw