I have a listbox that has customer transactions. There is a button that reconciles the highlighted transaction. The code for the reconcile button is:
Private Sub cmdRecon_Click()
If MsgBox("Are you sure you wish to reconcile selected records", vbYesNo) = vbYes Then
For i = 0 To List1.ListCount - 1
If List1.Selected(i) Then
Text1.Text = List1.Selected(i)
DE1.Con1.Execute ("UPDATE Transactions SET Pending = 'Paid' WHERE PhoneNumber = '" & Left(List1.List(i), 10) & "' ")
End If
Next i
End If
List1.Clear
Command1_Click
End Sub
The problem is that if you highlight a specific transaction, it reconciles all transactions with the corresponding phone number and not just the highlighted transaction. This is a problem because certain phone numbers have multiple transactions. Any help would be greatly appreciated.


Reply With Quote