>I have a table which will store information with regards to test results. I want to make the field LabRef unique. So if they copy the record and dont change the labref it will not allow them to store the record. I have played around with candidate index but cannot get it working. Can nybody help me in how to do this?
>
>MAny Thanks
Neil,
After inserting the record you must change the record pointer so the error to be rised. Make the Index Primary or Candidate (if you have primary index already)
There where you insert the record:
INSERT INTO .....
m_record = recNo("YourTable")
TRY
GO TOP
GO TO m_record
CATCH
Message Here
TABLEREVERT(.t.)
ENDTRY
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.