sele party_master sele party_master.p_grp,party_master.p_code from party_master into table temp sele temp index on p_grp + p_code TAG p_grp seek party_master.p_grp + party_master.p_code if found() wait window "Cannot enter duplicate code" thisform.p_code1.setfocus endif found if .not. found() sele party_master repl party_master.p_grp with party_grp.p_grp repl party_master.p_codd with party_master.p_grp + party_master.p_code endif not foundeven then it accepts the duplicates -