I have a pair of listboxes, the first populated with category names from a database. The user will be able to select one or more category names in the first listbox and move them over to the second list box. The process can be reversed (moving names from the 2nd back to the 1st) and redone (1st to the 2nd) as many times as the user likes. Works great.
The data in the 2nd listbox will be used in a SQL query later on. My problem is the category names (chemical names to boot) can be very long, many that are 20-30 characters, and I have no say in the naming. There is a category CODE associated with each category NAME. Is there a way to easily track the codes back and forth as the user moves names between listboxes so I can use the codes in the SQL?
I've thought about arrays, but it seems risky - e.g., an array with 10 elements and removing elements 3 and 8 then 'removing' the empty elements. I could concatenate the code & name and display the concatenated results in the listboxes, but I'd rather not have the user see the category codes since they are meaningless to the user and likely to cause confusion. Thread 222-426213 (Neenas19) answers my question if if have to concatenate, but I'd rather not show those codes.
Thanks,
Jim
The data in the 2nd listbox will be used in a SQL query later on. My problem is the category names (chemical names to boot) can be very long, many that are 20-30 characters, and I have no say in the naming. There is a category CODE associated with each category NAME. Is there a way to easily track the codes back and forth as the user moves names between listboxes so I can use the codes in the SQL?
I've thought about arrays, but it seems risky - e.g., an array with 10 elements and removing elements 3 and 8 then 'removing' the empty elements. I could concatenate the code & name and display the concatenated results in the listboxes, but I'd rather not have the user see the category codes since they are meaningless to the user and likely to cause confusion. Thread 222-426213 (Neenas19) answers my question if if have to concatenate, but I'd rather not show those codes.
Thanks,
Jim