Hmm, well, I've looked there and can't find anything that works. I've
found an article on passing values from a mulit-select box to a query
but nothing about how to loop through itmes in a listbox and add it to
a table. I just really need info on how to go through the items in a
listbox. I've got the code to add the records to a table and that part
works. It just won't pick up each name in the SelectedItems box and
add it. I'm assuming I need to loop through each name in that box as
the names get sent over to it from the listbox with all the Employee
names in it. Am I correct? Thinking wrong? Trying to be too complex on
my form?
Melissa
pi********@hotmail.com (Pieter Linden) wrote in message news:<bf**************************@posting.google. com>...
mc****@gaf.com (Melissa Cowan) wrote in message news:<25**************************@posting.google. com>... I am using Access 2000. I have the Developer's handbook and got the
code for the mulit select listbox from there. It sends the selected
value to another listbox, lstselected. What I need to do is loop
through there and add each item to a table. I can add the other info
fromt he form to a table, just not the otems in the listbox. It only
shows as 0. I tried using the varItem and it told me that the action
is not supported. I'm a bit rusty in my Access programming so any help
is appreciated. Thanks.
Melissa Cowan
there's code at mvps.org for looping through the selecteditems
collection of a listbox. Then you'd just open a recordset based on
the table and then use the .Add method to add a new record, .Edit it,
then .Update it once you've made all your additions. Nothing doing.
Should all be under "Recordset" in the help.