Hi Steven,
Try something like that:
m.nRecNo = Iif(Eof() .or. Bof(),0,RecNo())
Locate for YourField = m.NewValue .and. RecNo()#m.nRecNo
m.lDuplicated = Found()
If m.nRecNo#0
Go m.nRecNo
EndIf
Return m.Duplicated
I didn't test it here, but I think it works...
I don't know what is the sittuation that you are using it... I use something like that in child grids to avoid users repeat your entries...
If you having problems with Primary (or Candidate) indexes, I think you need control it using an error routine!
[]s!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte