Try
SELECT * FROM mytable ;
WITH (Buffering = .T.) ;
WHERE <New User Entry> ;
TO SCREEN NOCONSOLE
IF _TALLY > 1
COUNT FOR <New User Entry> to nCount
GOTO (nCurrenRecno)
IF nCount > 1
>I am refactoring old code (written in VFP 5) that check if user entry is unique in a table.
>
>The table has NO index tags and it is a fairly small table (up to 100 records). The table is opened with Buffering 5.
>
>My code is quire complex. Here is a summary of what it does:
>
>1. Open the same table AGAIN
>2. SET FILTER TO THE RECNO() <> nCurrenRecno
>3. LOCATE FOR New User Entry.
>4. If not found, the entry is unique.
>
>Is there a simpler method to do it in VFP 9 SP1? Without, maybe, opening the table again?
>
--sb--