My tables are PURCHASE and SALES...
In PURCHASE table, fields are CODE(primary key), PRICE, DATE, TOTAL, QTY...
when I'm entering datas in form and when i click submit, the datas stored...
but when i enter same DATA(CODE), it is showing error...
i don't want to show the DEFAULT ERROR message...
so, i want to search whether the CODE is already in database or not...
i.e When i click SUBMIT button, 1st it has to search whether the CODE is already PRESENT in table or not. if it is not there, DATAS have to be stored. otherwise, it has to DISPLAY MESSAGE BOX.