Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indexseek(), Seek, Seek()
Message
De
17/09/2003 19:21:37
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Indexseek(), Seek, Seek()
Divers
Thread ID:
00830146
Message ID:
00830146
Vues:
65
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
Fil
Voir

Click here to load this message in the networking platform