Hi, I am using INLIST() function to check whether any of my key is
in my lKeyList, but it is not working for me, below is part of my
code that I cut out for testing and is not working too.
Inside admin.dbf, there are record of 100,128,100 and 102
Please kindly comment why I not getting inlist() to work ?
SET DELETED ON
gDstDir = "d:\winprog\pdatask\data\"
lKeyList = ""
USE (gDstDir+"admin.dbf") IN 0 ALIAS adm
SELECT adm
GO TOP
DO WHILE NOT EOF("adm")
lKey = ''
lKey = ALLT(STR(adm->keybrd))
IF NOT EMPTY(lKey)
Messagebox("Checking keylist = "+lkeylist+", with current key = "+lkey)
IF NOT INLIST(lKeyList, lkey)
Messagebox("Not in list")
IF EMPTY(lKeyList)
Messagebox("Key list empty")
lKeyList = lkey
Messagebox("New key list is now : "+lkeylist)
ELSE
Messagebox("Before append Keylist = "+lkeylist)
lKeyList = ALLT(lKeyList + "," + lKey)
Messagebox("After append, New Keylist = "+lkeylist)
ENDIF
ENDIF
ENDIF
SKIP +1 IN adm
ENDDO
USE IN adm
messagebox("The final keylist = "+lkeylist)
CLOSE DATA ALL
Best Regards
Virusim