Results 1 to 2 of 2

Thread: ListBox Selection Problem (resolved)

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Posts
    16

    ListBox Selection Problem (resolved)

    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.
    Last edited by TeamPIP; Jan 6th, 2003 at 02:16 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width