Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Adelaide, South Australia, Australia
    Posts
    146
    Thanks
    5
    Thanked 5 Times in 5 Posts
    I have created a dialog box using an Access form.

    • The dialog box includes a list of committees, populated from a query.
    • The first (hidden) column in the list box is the ID number, and the second column is the committee name.
    • Selection of single or multiple committees in the list will enable the user to carry out further activities, such as e-mailing all members of the committee or printing a report showing all selected committees.


    This part isn't the problem.

    The dialog box can be opened from the main data entry form for the committee details, from which I can pass in the ID for the currently-displayed committee.

    When I open the dialog box in this way, I would like the currently-displayed committe to be highlighted in the list box, but cannot work out which property of the list box needs to be set to do this.

    Any ideas?

    Thanks and regards

    Alison C

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    I attach a demo.
    The CommitteeID is passed using Openargs.
    Then you need to loop through all the entries in the listbox and compare each of their IDs with the value retrieved from OpenArgs.
    (I find the code for dealing with multiselect list boxes very hard to remember. I need to look it up somewhere every time I want to use them.)

    [attachment=90126:committees.zip]
    Attached Files Attached Files
    Regards
    John



  4. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Adelaide, South Australia, Australia
    Posts
    146
    Thanks
    5
    Thanked 5 Times in 5 Posts
    Many thanks, John - Should have guessed I'd need to loop through to set it, as that's what I'll be doing to identify selected items on closing the dialog box.

    Cheers

    Alison C

Posting Permissions

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