>local lcTable, lcField, lnSelect, lnRec, lnID, lnCount >lcTable = juststem(alltrim(This.cSource)) && mytable.fieldname >lcField = justext(alltrim(This.cSource)) >lnSelect = select() >select (lcTable) >lnRec = recno() >lnID = This.Value >count to lnCount for ID = lnID >goto lnRec >if lnCount > 0 > ** Duplicate found > select (lnSelect) > return 0 >endif >** otherwise the count was 0 >replace &lcField with lnID >select (lnSelect) >return .t.