Nadya,
this is a way to go, I thought about before, but I find it to slow.
And to move record pointer - No No Noooooooo. I work with GRID's BEFORErowCOLCHANGE, this like to fire on reasons I dident like to think of. And there is code fired from this event ....
I have a lot of easy-to-access filters controled by TriState-Check buttons on my grids and did not want to bore people more than I need.
I've tried
...
lcAct_Alias = ALIAS()
lcField = FIELD(1)
SELECT &lcField;
FROM &lcAct_Alias;
TO SCREEN NOCONSOLE;
&lcWhere
lnRecCount = _TALLY
...
but this give problems with FoxPro's "==" Operator wich is different on SET FILTER and SELECT SQL.
I guess this will also occur with other SQL commands.
Ive also tried
...
COPY TO Delete_Me
USE Delete_Me IN 0
lnRecCount = RECCOUNT()
USE
DELETE FIELE Delete_Me.*
...
but this is also a kludge.
For some actions the access is CLICK-CLICK on a CHECKBOX to reach a TRISTATE (it's simple a cycle off - on - not - off), every CLICK changes the filter, every change of filter need to be count, change of filter changes display and remember we use this close - to - assembler - language that is fast on build in commands and so slow in loops and jumps.
Thank you for help
a nice weekend to everybody and goodbye
Lutz