I’m trying to perform a check on a table to see if a record has been inserted yet, however using the test on the insert command is not appropriate because I’m ending up with duplicate entries! If more than one duplicate record is found it is to error as an invalid entry. Any help is much appreicated, thanks!
If I interpret your posting right, your so called “duplicates” are not really duplicates, because the primary key is different/unique - otherwise the INSERT would fail. So you want to check on other fields, than the primary key?! Well, maybe you can do something like this: MyTable OnInsert() MyTableVar.SETRANGE(Field1, [Rec.]Field1); MyTableVar.SETRANGE(Field2, [Rec.]Field2); MyTableVar.SETRANGE(Field3, [Rec.]Field3); ... IF MyTableVar.FIND('-') THEN ERROR('This Record exists already!');
Regards,