>>Hi Nadya,
>>If you didn't want to use a candidate index and trap the errors you could try adding the following:
>>
>>SELECT FunName ;
>> FROM AllFunctions ;
>> GROUP BY FunName ;
>> HAVING COUNT(FunName)>1 ;
>> ORDER BY FunName ;
>> INTO CURSOR csrDups
>> nDups = IIF(_Tally > 0, .T., .F.)
>> USE IN csrDups
>>IF nDups = .T.
>> =MESSAGEBOX("Cannot save, the Function Name is already used",0,"")
>> nDups = .F.
>> RETURN .F.
>>ENDIF
>>
>>
>We have a class, which uses this method, but it does not work for buffered tables, since SQL works with table directly.
Ahhh... that's why I resorted to using cursors for this form...
VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)
www.wulfsden.com