>select distinct STR(Userno,2) + " "+ IIF(ISNULL(username)," ",SUBSTR(Username, 1, 10))+ IIF(ISNULL(Users.init)," ",Users.init)+ IIF(ISNULL(Users.PWChgDate),' / / ',DTOC(Users.PWChgDate)) + " "+ALLTRIM(STR(Users.Language)) from users where not deleted() order by userno into cursor cur_users>
*Your original SQL select distinct STR(Userno,2) + " "+ ; IIF(ISNULL(username)," ",SUBSTR(Username, 1, 10))+ ; IIF(ISNULL(Users.init)," ",Users.init)+ ; IIF(ISNULL(Users.PWChgDate),' / / ',DTOC(Users.PWChgDate)) + ; " "+ALLTRIM(STR(Users.Language)) ; from users ; where not deleted() ; order by userno ; into cursor cur_users * Listbox.init lcSQL = [select distinct STR(Userno,2) + " "+] + ; [IIF(ISNULL(username)," ",SUBSTR(Username, 1, 10))+] + ; [IIF(ISNULL(Users.init)," ",Users.init)+ ]+ ; [IIF(ISNULL(Users.PWChgDate),' / / ',DTOC(Users.PWChgDate)) + ]+; [" "+ALLTRIM(STR(Users.Language)) ]+; [from users ] +; [where not deleted() ]+; [order by userno ]+; [into cursor cur_users] with this .Rowsourcetype = 3 .Rowsource = lcSQL endwithCetin