Hi Sergey and thanks for the reply.
Yes I know that set filt doesn't move the file pointer - that's why I do Go Top. I usually do LOCATE (I'm an advocate of doing this) but I changed it to Go Top, in case that was what was causing the problem (as I don't have any indexes on the table), just before posting.
Your solution would seem sound but
1) I still don't know why I'm getting this mythical extra rec no (and with me it's like "I gots to know" :-)).
2) In this very case, I'd have to issue:
If lnRecNo > 0
Goto lnRecNo
Endif
which means, in the "all hidden" case I still wouldn't be able to get back to my current record when I toggle back to show.
Cheers
Terry
>Hi Terry,
>
>I would adjust code as follow
Select pxEntryCodes
> IF BETWEEN(RECNO(), 1, RECCOUNT())
> lnRecNo = RECNO()
> ENDIF
>
> If .lHide
> Set Filter To EMPTY( FacCatCode)
> Else
> Set Filter To
> Endif
> ***Go Top
> LOCATE
>
BTW, SET FILTER by itself doesn't move record pointer even when current record doesn't satisfy the filter conditions.
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.