Information générale
Catégorie:
Codage, syntaxe et commandes
Titre:
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,
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement