Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple entries in a table with a list Box 1

Status
Not open for further replies.

Saturn87

IS-IT--Management
May 14, 2002
7
US
I have a form that allows a administrator to assign questions to employees. Right now I can only assing one question to one individual at a time, but I would like to assign a question to a whole department(or a group). I have a list box that shows all the employees in a dept., but when I change it to allow multiple selections you can't enter in the data. I would like to click on how ever many people I need and assign them the same question, but I can't seem to load multiple data this way. Any clues
 
You could have another listbox that you add the selected people to. Then have a coule of buttons, Add and Remove. Just an idea

Grant
 
The dual list box would be visually easier for the user to see what he has. If you go this route, I would suggest using the ActiveX control Microsoft Forms 2.0 ListBox. It's easier to transfer items from one list box to another.

However, you can do it the way you described. I assume that after the user selects the items from the list box, he/she then selects the question. After the question has been selected, you simply loop thru the items selected and update the appropriate records. To Loop thru the items selected do this:

Dim varItm As Variant

For Each varItm In lstYourListBox.ItemsSelected
Debug.Print lstYourListBox.ItemData(varItm)
update your records here
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top