If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Multiselect for listbox
I understand that it is bad to store multiple data in one field. However how could we if we wanted to by using the listbox control. I need to be able to store multiple selections in a form to a field in a table where the multiple selections have a semicolon to seperate each piece of data(the way outlook does when you select more than one recipient). For example: if you were chose peanut butter, jelly, bread. It would be stored in the sandwich field "Peanut Butter;Jelly;Bread".
|
#2
|
|||
|
|||
Multiselect for listbox
Loop through the ItemsSelected collection of the list box, concatenating the
items and separator into a string that you will assign to your field. You will need to write another routine to perform the reverse operation in the Form_Current event, i.e. parsing the field and selecting the items in the list box. Honestly, doing the job properly with a subform and related table is much easier. -- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Jay" wrote in message ... I understand that it is bad to store multiple data in one field. However how could we if we wanted to by using the listbox control. I need to be able to store multiple selections in a form to a field in a table where the multiple selections have a semicolon to seperate each piece of data(the way outlook does when you select more than one recipient). For example: if you were chose peanut butter, jelly, bread. It would be stored in the sandwich field "Peanut Butter;Jelly;Bread". |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using the results of a Multiselect list | Deb Smith | Using Forms | 1 | June 16th, 2004 02:55 AM |
MultiSelect | Outta Luck | Using Forms | 1 | June 15th, 2004 03:28 PM |
Averaging multiple ranges through multiselect listbox | ZX210 | General Discussion | 1 | June 14th, 2004 11:36 PM |