Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Location
    metro Detroit
    Posts
    634

    Unanswered: multiselect listbox as query parameter

    How do you format the results of a multiselect listbox to be used as the criteria in a query?

    I have a form with a multiselect listbox. There is a textbox on the form to hold the selected items after being formatted through code. The field I want to filter is a text field. I can format them to use as a where condition to open a form, but I can't get it formatted to use as criteria in a query (I have tried several formats).

    The goal is to use the selection to filter a record set and email it as an attachment. Niether SendObject nor the TransferSpreadsheet allow for a seperate filter or where clause and I want to send the results of a saved query rather than one created through code.

    Any suggestions would be appreciated.

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    I think you can use IN option in your criteria to search in a list of items like:
    Code:
    SELECT Fields
    FROM tablename
    WHERE (CriteriaField) IN ("JUPITER", "SATURN", "EARTH");
    ghozy.

  3. #3
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    oh sorry, I understood you wrong.
    you could make a public function which returns criteria set and you could use it in criteria section of your query I guess.
    ghozy.

Posting Permissions

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