Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek not working
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01133476
Message ID:
01133541
Views:
12
>>
>>lclregno = UPPER(ALLTRIM(thisform.pgfpageframe1.page4.txtCma_regno.Value))
>>
>>SELECT 0
>>SELECT NWC
>>
>>WAIT WINDOW "reg is_" + lclregno + "_"
>>
>>IF lclregno <> ""
>>	
>>	WAIT WINDOW "regno variable is not blank"
>>	
>>	SELECT NWC
>>	SEEK lclregno ORDER CMA_regno
>>	
>>	IF EOF()
>>		WAIT WINDOW "try a locate first"
>>		SELECT NWC
>>		LOCATE FOR lclregno = UPPER(ALLTRIM(CMA_regno))
>>		IF FOUND()
>>			WAIT WINDOW "locate found it"
>>		ELSE
>>			WAIT WINDOW "not found"
>>		ENDIF
>>...
>>...
>>
> Before the real problem, is there a reason you use EOF() instead of !Found() ?
>Now to the question: are you sure that the table and index you think you are using, actually being used?
>After the Select NWC , how about trying:
>
>set order to CMA_regno
>=messagebox(dbf()) + " "+key()
>
the eof() usage comes from code that i took over, i changed to using found() myself after talking to David Frankenbach and a few other here. the index is correct and since i put in the selects right before the seek and locate i assumed that the correct table was being used. i put in you code to check the file and index, the file was definately correct but i am having problems getting key() to return the correct value.
~M
Go raibh maith agat

~M
Previous
Reply
Map
View

Click here to load this message in the networking platform