I have a listbox that pulls data from MySQL Workbech through a selection from the combobox. Each of the rows of the pulled data has an auto increment ID. I have a code that sends the values of a selected row into assigned text box.
Now what i want to do is that i want to edit say the Qty in the textbox, then update it directly in the listbox by using the auto increment ID as reference before updating it in MYSQL Workbench. I have the code below but it looks like its no where near what i want because it does not work at all. I will be grateful if you guys can have a look at it for me. Please note that i am really a novice in this game. Hahahahaha. Thanks
Private Sub btn_Update_Sales_Click()
Dim r As Integer
With frmUpdateSales.ListBox3
For r = 0 To .ListCount - 1
If .List(r, 0) = frmUpdateSales.txtTransactn_ID.Value Then
.AddItem
.List(r, 6) = frmUpdateSales.txt_Qty.Value
End If
Next r
End With
End Sub