G
Guest
I have a listbox with maybe 5 things in it. The user will select from 1 to 5
of those things, and then click a button.
When the button is clicked, I want to go through every item in the listbox,
create a corresponding record in TableA for every selected item, and create a
corresponding record in TableB for every non-selected item.
I was using a For Each loop to go through each row in
Me.listBox.ItemsSelected and then using a DAO recordset with AddNew to add
records for each selected item, but I don't know what kind of loop to use to
look at EVERY item in the list box and then check each one to see if it's
selected or not.
I'm sure it's probably a simple solution; I just can't get it.
Thanks.
of those things, and then click a button.
When the button is clicked, I want to go through every item in the listbox,
create a corresponding record in TableA for every selected item, and create a
corresponding record in TableB for every non-selected item.
I was using a For Each loop to go through each row in
Me.listBox.ItemsSelected and then using a DAO recordset with AddNew to add
records for each selected item, but I don't know what kind of loop to use to
look at EVERY item in the list box and then check each one to see if it's
selected or not.
I'm sure it's probably a simple solution; I just can't get it.
Thanks.