you have a set of data like this
id name
---------------
123 toronto
124 scarbo
125 north york
---------------
when add to the list, do
listbox.additem "toronto"
listbox.itemdata(listbox.newindex) = 123
listbox.additem "scarbo"
listbox.itemdata(listbox.newindex) = 124
listbox.additem "north york"
listbox.itemdata(listbox.newindex) = 125
,,,
when retrieve do this
id = listbox.itemdata(listbox.listindex) '// say if you select toronto for the moment
id would be 123, then using 123 to retrieve 'toronto' from the
original list
was that what you want ?
id name
---------------
123 toronto
124 scarbo
125 north york
---------------
when add to the list, do
listbox.additem "toronto"
listbox.itemdata(listbox.newindex) = 123
listbox.additem "scarbo"
listbox.itemdata(listbox.newindex) = 124
listbox.additem "north york"
listbox.itemdata(listbox.newindex) = 125
,,,
when retrieve do this
id = listbox.itemdata(listbox.listindex) '// say if you select toronto for the moment
id would be 123, then using 123 to retrieve 'toronto' from the
original list
was that what you want ?