Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003
    Location
    Vadodara, India
    Posts
    6

    Arrow Unanswered: Copy Multi Selection in Text Box of putting lavue in Qry

    I have List Box List45 (a Multi Slecetion List) and a Text Box Text28 in a form. I want to put selected value from list box to Text Box to use the same in Qry. Can any body help me to give a VBcode for the saem.

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    You say it is multi-select - so what behavior do you want if a user selects multiple entries in the listbox ?

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Re: Copy Multi Selection in Text Box of putting lavue in Qry

    Originally posted by bansals_vad
    I have List Box List45 (a Multi Slecetion List) and a Text Box Text28 in a form. I want to put selected value from list box to Text Box to use the same in Qry. Can any body help me to give a VBcode for the saem.
    Text28= list45.ListIndex
    This will copy the only one item which you have chosen in the list box to the textBox.

    If u use multiselection, you could use a For each and separate the values with comma or any separator you want.

  4. #4
    Join Date
    Feb 2002
    Posts
    2,232
    listindex will only return the index. To return the actual value you can use the text property. Also, if you want to handle multiple values you will have to check the selected property and test for true.

  5. #5
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb Re: Copy Multi Selection in Text Box of putting lavue in Qry

    Originally posted by hammbakka
    Text28= list45.ListIndex
    This will copy the only one item which you have chosen in the list box to the textBox.

    If u use multiselection, you could use a For each and separate the values with comma or any separator you want.

    I mean use something like that:

    Text28 = List45.Column(0, List45.ListIndex)

Posting Permissions

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