Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checking for value
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00334372
Message ID:
00335536
Views:
15
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform