>Nadya,
>
><<
>You have to move record pointer to activate the filter. Check Help on SET FILTER command.
>>>
>
><< from VFP 5.0 Help
>The condition specified by SET FILTER isn’t evaluated until the record pointer is moved in the table.
>>>
>
>I am a little confused. This is how my code looks:
>
>!!!!!!
>SELECT MyTable
>set order to myindex
>SET filter to fieldone = "VALUEA"
>!!!!!!
>
>When I step through the code, I notice that in my data session window, before I give the set filter command, MyTAble has all te records 9 records where fieldone= VALUEA, VALUEB etc.
>
>But just after I give the SET FILTER, MYTable only has records where fieldone='VALUEA'. I did not have to give a skip / go statement. How can this be?
>
>Your help is greatly appreciated.
>
>Thank you.
>
>Ria
Put GOTO recno() after SET FILTER command.
Try SET FILTER TO and don't move pointer. What would you see?
Anyway, I think, Calvin is right. If you can avoid SET FILTER command, you better avoid it. Of course, if you have less than 300 records, you may still use it.
If it's not broken, fix it until it is.
My Blog