Tag LOFFID cannot exist the way you describe it because expression 'cName+nBrNum+cBrName' is invalid. You cannot add numeric value to a string or a string to a numeric value.
>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
--sb--