>Could you please tell me how i can show all the usernames from the cursor into a message box with a comma delimit.
>
>**********
>select username from user where logged = 1 into cursor userlist
>
>
>=messagebox(userlist)
You have to create a string. One way to do this is:
select username from user where logged = 1 into cursor userlist nofilter
local lcUserList
lcUserList = ""
scan
lcUserList = lcUserList + UserName;
+ iif(recno() < reccount(), ", ", "")
endscan
messagebox(userlist)
Notes:
NOFILTER will make sure the records are copied into a separate cursor. This is required for the recno() < reccount() comparison.
The equal sign isn't required at the beginning of most commands.
I am assuming VFP 6 or later.
HTH,
Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)