>On my form, I want to show the user what non-deleted record they are on. I'll have one textbox for the current record number and one for the total records. I was using RECNO()/RECCOUNT() until I tried to delete a record and realized that messed things up. I got around the last on by using COUNT FOR NOT DELETED(), but I can't think of a good way around the first one.
>
>This has probably been asked before, but the dang search doesn't like "X of X" and I couldn't think of a better search string. :(
>
>Thanks,
>
>Michelle
In my answer I will refer to "X of Y" instead of "X of X". The question you are asking is how to find out what "X" is. "Y" is easy, as you have stated it is a record count of the non-deleted records. As I see it "X" is really variable depending on how the table is ordered. But it sounds as if you are just using physical table order. So I would do something like:
lnRecno = recno()
count to lnDeletedRecs for deleted() and recno()
DisplayValue = lnRecno - lnDeletedRecs
Of course if the table was ordered using an index than that would be a whole other set of code.
Rip Ryness
International Falls, MN