>help!
>what am I doing wrong here. It returns an error saying is missing a comma.
>Can I use the LOCATE here?
>
>IIF(LOCATE FOR temp.Fyr = '2002' AND temp.source '777'),temp.descr," ")
LOCATE is a command, not a function. It does not return anything.
You're missing an "=" between temp.source and '777' too.
Also, the IIF is terminated after '777' - you've got too many ")"s
Use LOCATE then FOUND() - or better yet, SEEK() on a tag.
LOCATE FOR temp.fyr = '2002' AND temp.source = '777'
lcDesc= IIF(FOUND(),temp.descr," ")
better
lcSearch = PADR("2002",FSIZE("fyr","temp"))+PADR("777",FSIZE("source","temp"))
lcDesc = IIF(SEEK(lcSearch,"temp","tagname"),temp.descr," ")
Insanity: Doing the same thing over and over and expecting different results.