Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexseek(), Seek, Seek()
Message
From
17/09/2003 19:21:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Indexseek(), Seek, Seek()
Miscellaneous
Thread ID:
00830146
Message ID:
00830146
Views:
64
Hi,

I have the following code, I can't understand why the INDEXSEEK does not find the value I am searching for. I would like to know if anyone can give me new insight.

This code is located in the Valid() of a dropdown list.
The controlling .dbf is 'Loanoff' set to the order 'SORTORD'.
LOFFID is a TAG name consisting of cName+nBrNum+cBrName.
The value passed to lcTxtVal is cName+nBrNum+cBrName; cName C(25),nBrNum N(3),cBrName C(20)

I would like to search for this value which, I know does indeed exist in Loanoff.dbf but it is not finding it. Do I have to change the ORDER of Loanoff.dbf to 'LOFFID' before I INDEXSEEK? Doesn't the last parameter in my INDEXSEEK take care of that? What am I doing wrong?

I also tried:
SEEK lcTxtVal ORDER LOFFID IN Loanoff
SEEK(lcTxtVal,'Loanoff','LOFFID')
SEEK &lcTxtVal ORDER LOFFID IN Loanoff (error generated)
SEEK(&lcTxtVal,'Loanoff','LOFFID') (error generated)

LPARAMETERS lcTxtVal

WITH THISFORM
IF EMPTY(lcTxtVal)
RETURN 0
ELSE
=INDEXSEEK(lcTxtVal,.F.,'Loanoff','LOFFID')
IF FOUND('Loanoff')
WAIT WINDOW "This Loan Officer Already Exists" TIMEOUT 1
RETURN 0
ELSE
.mTransfer()
.cmdSave.Visible = !.Editing
ENDIF
ENDIF
ENDWITH

Thank you,
Next
Reply
Map
View

Click here to load this message in the networking platform