General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only