Information générale
Titre:
Want to check (message duplicate record found)
I am trying to locate are there any records in the table with the same data what i am trying to insert into the table.
If there is a record with the same data then it should give me a message saying duplicate record found.
I am using the below for locating a duplicate records but it is not working could you please tell me in correcting the problem Thanl you very much.
*************code ****************
SELECT sub
LOCATE FOR project_no = thisform.container2.txtnewproj_no.value AND ;
Workpkg_no = thisform.container2.txtnewwpkg_no.value AND ;
sub_sec = thisform.container2.txtsub_sec.value AND ;
sub_para = thisform.container2.txtsub_para.value AND ;
sub_seq = thisform.container2.txtsub_seq.value
if found()
=MESSAGEBOX("Duplicate Record Found")
thisform.container2.txtsub_sec.setfocus
return .t.
else
append blank
replace project_no with thisform.container2.txtnewproj_no.value
replace project_no with thisform.container2.txtnewproj_no.value
replace project_no with thisform.container2.txtnewproj_no.value
replace project_no with thisform.container2.txtnewproj_no.value
replace project_no with thisform.container2.txtnewproj_no.value
= tableupdate(.t.,.t.)
endif
*****************end**************
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement