Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2001
    Posts
    175

    Unanswered: Help with list box

    I have a list box with invoice numbers and amounts. What I would like to accomplish is when the user select an invoice (they can select more than one) I would like the invoice numbers to be copied to another field (description).

    Any help with this will be greatly appreciated.

  2. #2
    Join Date
    Aug 2006
    Posts
    559
    Quote Originally Posted by toukey1
    I have a list box with invoice numbers and amounts. What I would like to accomplish is when the user select an invoice (they can select more than one) I would like the invoice numbers to be copied to another field (description).

    Any help with this will be greatly appreciated.

    Check for posts by me, one specifically says some thing about "spalsh screen, run query"...

    One of the other users here posted a response to do one of the things that you asked about, the selecting multiple instances in a list box.

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    You must loop through the selected items in the listbox:
    Code:
    Dim strSelected As String
    Dim varItem As Variant
    
    strSelected = ""
        For Each varItem In Me.SearchResults.ItemsSelected
            If Not IsNull(varItem) Then
                strSelected = strSelected & Me.SearchResults.ItemData(varItem) & " "
            End If
        Next
    
    MsgBox strSelected
    George
    Home | Blog

  4. #4
    Join Date
    Sep 2001
    Posts
    175
    Thanks for the responses, I will give them a try

Posting Permissions

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