Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for value
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00334372
Message ID:
00335536
Vues:
14
Hello Ryan...
Perry and Dean are righ, however when you use SEEK or LOCATE funtion(), the cursor will move into the table, this results the records that is trying to validate is added to the table.
I had the same problem, this one was resolve, this way:
1.- Add the table with you will check the value again, I mean, whether the table is called customer, when you added the customer again this will get the name customer1.
2.- Use this code in the lostfocus method.
with thisform
local lcrecordfind;
lcrecordfind=.idcustomer.value
sele customer1
set order to tag check
seek lcrecordfind
if found()
nodefault&& To prevent the usual LostFocus from acting
=messagebox("This customer..., " + chr(13) +;
"Is allready in the system." + chr(13) +
"Check Out..!",16,"Error")
thisform.idcustomer.setfocus()
endif
release lcrecordfind
set order to tag customer
sele customer
endif
endwith

Ready with this you shoudl fix your problem.
Let me know if this work.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform