Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
In form method always finds a value, correct live
Message
From
07/09/2006 16:48:01
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01152039
Message ID:
01152088
Views:
19
>>I have a form where I want to check if a value is already in the tabke. Because of what I am doing I check as get to next field (also want to check in save button). I use INDEXSEEK(value), SEEK(value), or LOCATE FOR field = value it always seens to return .T. (found the value) even when it is not in the table. If I do the same thing from the command window it works as expected.
>>
>>What am I missing?
>>
>>TIA
>
>Post your code. It could be either corrupted index or wrong SET EXACT settings...

I deleted the code and retype it. It works as expected now. I have no idea why it did not work before.

my code has the in the gotfcosus method is
llfound = INDEXSEEK(lccid)

IF llFound AND lcCID <> gCID
	=msgfrm(SPACE(4) + 'User ID ' + lcCID + ' already exists.' + ;
		CHR(10) + SPACE(10) + 'Re-enter or Revert.' ;
		,'0',,'S','Existing field value',0,gnMsgWait)
	KEYBOARD '{LEFTARROW}'
	RETURN 
ENDIF
I used debug to see the values
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform