Results 1 to 4 of 4
  1. #1
    Robbyp2001 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    25

    Adding [All Records] as an option in a query criteria.

    Good morning folks.



    I have a drop down list on a form which is linked to a query containing all records IDs. The selection made in the drop down list will return one record, correctly and this is then viewed on a different form. This part works well. What I would like to do is to give the user the option of selecting a single record from the list or to select ALL the records on the list which will then be displayed on the same form. The idea is to allow the user to scroll through the records if required.

    I have done this before by adding something to the criteria in the underlying query, but for the life of me I cannot remember what it was.

    Anyway the simple criteria currently in the underlying query is this:

    [Forms]![Select Student Record for Edit]![Combo0]

    This of course will return only the secord selected from [Combo0], how to I add 'All Records' as a user option?

    Thank you in advance for any suggestions.

    Rob

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    One option is to have the user leave the combo blank and do this:

    http://access.mvps.org/access/queries/qry0001.htm

    or use that technique with this:

    http://access.mvps.org/access/forms/frm0043.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Robbyp2001 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Oct 2011
    Posts
    25
    Wonderful Paul. After creating a new table with all the ID numbers plus a new entry "All Records" with an ID=0 then running the query from that as per your example, it now works a treat.

    Many thanks, you're a star!

    Rob

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Happy to help Rob!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 05-05-2011, 09:21 AM
  2. Option Groups and Adding Data to Tables
    By ipitydafool in forum Forms
    Replies: 5
    Last Post: 05-02-2011, 01:59 PM
  3. Replies: 10
    Last Post: 01-10-2011, 07:52 PM
  4. Adding Quality Points to Option Boxes
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-29-2010, 07:40 AM
  5. Replies: 3
    Last Post: 11-02-2010, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums