• MultiSelect listbox as a Parameter in a query (97)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » MultiSelect listbox as a Parameter in a query (97)

    Author
    Topic
    #374792

    I have a MultiSelect listbox on my form that has 4 columns(ID, NAME, Version,Price) . If i select more than one row how can I pass the vaules to a query. Does this make sense?
    Thanks
    dgw

    Viewing 3 reply threads
    Author
    Replies
    • #607525

      It makes alot of sense; unfortunately I don’t think it can be done. You can use it to create a WHERE clause for use in an OpenReport or OpenForm, but not a query.

    • #607568

      What you could do is dynamically build the query and use a CreateQueryDef command to create the query.
      Pat cheers

    • #607619

      How about having a temp table (ie. a table that normally has no records) then inserting the values selected from the listbox into the table, and using the values from the table as the parameters for the query?
      e.g. where fieldname in (select * from tbltemp)
      You would also need a delete query to clear the tmep table out again.

    • #607731
    Viewing 3 reply threads
    Reply To: MultiSelect listbox as a Parameter in a query (97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: