Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Want to check (message duplicate record found)
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Want to check (message duplicate record found)
Divers
Thread ID:
00665596
Message ID:
00665596
Vues:
56
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
Fil
Voir

Click here to load this message in the networking platform