Hi David. I'm relatively new to VFP myself but here is what I found out through trial and error about "count for" and "set filter to statements".
Yes I try to use views when ever possible over "set filter to" statement. But VFP views have their own problems and any semi-complex views can be a bear to create for VFP.
I think one needs to make sure that with "set filter to " statement the varible that the table set filtered to is always in scope. "Thisform.MyProperty" will always result in an error when the it is referrence outside the form, unless a app. object is used such as "goapp.myactiveform.myproperty" is used. Or one can always use the dreaded PUBLIC variable and release it when the form releases.
HI-YO SILVER AWAY!!
The Lone Ranger, The late Clayton Moore R.I.P.
I am a fool!