General information
Category:
Coding, syntax & commands
Title:
Indexseek(), Seek, Seek()
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
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