Consulting

Results 1 to 3 of 3

Thread: Solved: Passing listview control value

  1. #1
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    271
    Location

    Solved: Passing listview control value


    I have a user form (frmSelectedQuote) with a listview control
    How do I pass the value selected to another form

    I can do this with a listbox control

    [vba]
    QuoteID = frmSelectedQuote.lstQuote.value
    [/vba]

    But the same doesn't work for a listview control

    I have tried things like

    [vba]quoteID = frmSelectQuote.lvwQuoute.selectedItem.text
    [/vba]

    I know this isn't a popular control (only 5 entries when I searched)
    but does anybody have any ideas?

    Ta

  2. #2
    VBAX Mentor
    Joined
    Dec 2007
    Posts
    462
    Location
    Store the value of the listbox as a string if it is a multi select listbox
    Then to pass it to another for [Forms]![Form name]![Control you are passing to].

    if you need more help with syntax let me know

  3. #3
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    271
    Location

    Thanks

    Trevor
    Thanks for the tip
    What I have done is make the variable Public and call it on the second form by using
    [VBA]leadID = frmSelectQuote.leadID[/VBA]

    seems to work OK

Posting Permissions

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