Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Jul 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    using multiselect list to generate a report query (Access 2000)

    Hi, I'm new to this, so forgive me if I'm not as clear as I can be.
    I'm using a multiselect list on a form to select more than one ID number. What I want to be able to do is use those numbers to generate a report that selects only those records corresponding to those ID numbers. I can't use a range because the numbers selected are not necessarily in order, I don't want to select the entire set of records and the number of records to be selected can vary at runtime (the number of records to be selected can be different from one instance to the next). I've set the list box on the form to multiselect, and I've used iteration to prove that the numbers can be selected, but how do I use this to generate the query I need to set the report to those numbers? Please help, I've spent 2 days on this now!!! <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>
    Thanks for any help you guys can give.
    Sue.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: using multiselect list to generate a report query (Access 2000)

    Use your iteration loop to select the ones you want and write them to a temporary table. Then use that table as the source of your report.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: using multiselect list to generate a report query (Access 2000)

    Pat's suggestion is one method. If you're comfortable with code, another method would be to use code to step through the ItemsSelected collection and generate a Where condition string for the report. Then you can simply that wherecondition argument to the report in the DoCmd.OpenReport call.
    Charlotte

  4. #4
    New Lounger
    Join Date
    Jul 2002
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: using multiselect list to generate a report query (Access 2000)

    Thanks guys - really helpful and much appreciated.
    Sue. <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

Posting Permissions

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