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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MultiSelect Listbox Showing and Saving

Status
Not open for further replies.

OrWolf

MIS
Mar 19, 2001
291
0
0
Hi there,
I have a detail form with a list box that need to be able to allow a user to select multiple entries. I was able to find the code to store the values in the child table, however that code is missing the option to remove values that are unselected. Also I don't have the code necessary to show the values that were previously selected. Does anyone have an example of this?

My AfterUpdate code:
Dim varItem As Variant
Dim rs As New ADODB.Recordset
rs.Open "Complaints_Trend_code", CurrentProject.Connection, adOpenStatic, adLockOptimistic
For Each varItem In Me.List2.ItemsSelected
rs.AddNew
rs!ComplaintGuid = Me.ComplaintGuid
rs!Trend_code = Me.List2.ItemData(varItem)
rs.Update
Next varItem
rs.Close
Set rs = Nothing
End Sub



Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top