I have a project that is due in a few days and I'm having an issue with one section. I created a really simply movie rental program and have a form for customers that uses a local DB for all the information on that form, one item on that table is "rentals" and is displayed as a listbox (to obviously display the movies they are renting). I then have a button to open a new window to select the movie rentals and that window is just a simple checkbox listbox with several items in there.
My issue currently is getting that information over to the rentals listbox but have it only update the record I was currently on.
Here is a snippet of the code that copies the selections to the listbox:
'Movie Selection
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim movCount As Short
movCount = cbMovieList.Items.Count - 1
For i = 0 To movCount
If cbMovieList.GetItemChecked(i) = True Then
frmCustomerMenu.lbMovieRentals.Items.Add(cbMovieList.Items(i))
End If
Next i
Me.Hide()
frmCustomerMenu.Show()
The problem is it updates the listbox for every database record, not just the one I was currently on. How would I go about adding what was checked to the listbox record for just the current user?