Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2006
    Posts
    2

    Question Unanswered: Use a Multi-Select List Box as a Parameter Query

    I have a query called MultiOM that I want users to be able to view a list of Organization Members by entering Organzation ID numbers. I want them to be able to select the organizations they want to view by selecting them from a list (sort of like a custom parameter). I know you have to use a code to make this work the problem is I don't know anything about code at all. I have searched the Net and found nothing that will work for me. Allen Brown's example does not help me. Can some one please give me verrryyy detailed help with this.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    pull parameters from which ROWS and COLUMNS???? This is untenable in a parameter query ...
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Apr 2006
    Posts
    2
    In this query you have Name, address, and organization Id. I want them to be able to view people in multiple organizations. I already have a query that allows them to view people in one organization.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Create the query dynamically at run time...

    ***Air-ware, use at your own risk***

    Dim sql As String
    Dim strOrgId As String
    dim varItem As Variant

    For Each varItem In yourList.ItemsSelected
    strOrgId = strOrgId & varItem.text & ", "
    Next varItem

    strOrgId = Left$(strOrgId, Len(strOrgId) - 2)


    sql = "SELECT org_id, name, address FROM yourTable WHERE org_id IN (" & strOrgId & ")"

    ***Air-ware, use at your own risk***
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

Posting Permissions

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