Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

List Box on Form

Discussion in 'Information Technology' started by ddunks, Jul 28, 2006.

Tags:
  1. ddunks

    ddunks
    Expand Collapse
    Guest

    I have 2 unbound list boxes on a form for a parameter query. My problem is
    it only takes the selection if multiselect is off. Which defeats the purpose
    of choosing more than one. Any thoughts?
     
  2. Loading...

    Similar Threads Forum Date
    Sikh News How The Left & Indian Nationalists Distorted The History Of Sikh Gadhar Movement - Breaking News Sep 21, 2016
    Interfaith Materialists And Its Discontents Interfaith Dialogues Jun 10, 2016
    Sikhi Quasi-Pragmatists And Quasi-Spiritualists, Care To Explain? Sikh Sikhi Sikhism Jun 6, 2016
    Cholesterol Is Finally Officially Removed From "naughty List" Health & Nutrition Feb 11, 2016
    Listening to Gurbani while driving?? Sikh Rehat Maryada Jan 13, 2016

  3. Allen Browne

    Allen Browne
    Expand Collapse
    Guest

    As you found, the query cannot read the items from a multi-select list box.

    Where is this query headed? Could you apply a Filter to your form, or use a
    WhereCondition with OpenReport? You could then loop through the
    ItemsSelected in the list box to build this where/filter string.

    Details in:
    Use a multi-select list box to filter a report
    at:
    http://allenbrowne.com/ser-50.html

    The code for the form's filter is identical, but instead of ending with:
    DoCmd.OpenReport strDoc, acViewPreview, WhereCondition:=strWhere
    you use:
    Me.Filter = strWhere
    Me.FilterOn = True

    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html
    Reply to group, rather than allenbrowne at mvps dot org.

    "ddunks" <ddunks@discussions.microsoft.com> wrote in message
    news:086113B7-DB84-43EE-9337-DDEC6CE0F68F@microsoft.com...
    >I have 2 unbound list boxes on a form for a parameter query. My problem is
    > it only takes the selection if multiselect is off. Which defeats the
    > purpose
    > of choosing more than one. Any thoughts?
     

Share This Page