Results 1 to 3 of 3
  1. #1
    jfs3647 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Oct 2015
    Posts
    1

    Dropdown All Records Selection Will Not Pull All Records.

    I need help with a report query function. I have a drop down control that has 3 values, Open, Closed, & Both. I am having difficulty with getting the query to pull all Open or Closed records when the dropdown choice is Both. It will display Open or Closed but not all records how would I write this?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    How are you opening filtered report? Are you using dynamic parameterized query as report RecordSource? Post the query SQL statement for analysis. If you are using VBA to build filter criteria, post code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 8 Access 2013
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    The key is to have the option Both evaluate the where clause to be
    Code:
    {MyStatusField] Like "*"
    Your combo box with the three values, Open, Closed, & Both needs to have two columns. The bound column will return "*", "Open", or "Closed"

    If using a form reference Your query would look something like this:

    Code:
    {MyStatusField] Like forms!MyFormName.cboMyStatusControlName
    The combo box properties are:

    Column Count: 2
    Column Widths: 0";1"
    Bound Column: 1
    Row Source Type: Value List
    Row Source: "Open";"Open";"Closed";"Closed";"*";"Both"

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

Similar Threads

  1. Unbound combobox doesn't pull in ALL records
    By TeamTraveler in forum Forms
    Replies: 9
    Last Post: 05-07-2015, 08:49 AM
  2. Replies: 1
    Last Post: 04-10-2014, 12:55 PM
  3. Pull Records Since Last Check
    By athyeh in forum Queries
    Replies: 5
    Last Post: 01-09-2014, 10:22 PM
  4. Replies: 2
    Last Post: 05-08-2013, 03:37 AM
  5. Add & Pull Records from Table via Form
    By sujitshukla in forum Programming
    Replies: 1
    Last Post: 08-02-2010, 05:51 PM

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