Results 1 to 2 of 2
  1. #1
    batowl is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Dec 2010
    Posts
    86

    Help with query criteria

    This strikes me as an easy problem that I cannot seem to solve on my own.



    I have a query where I want all the results for a given field returned. But I also want to show results in this query for results of this same field based on certain criteria. (Each of these query fields is actually filled with an expression where if the answer to the field is "Yes", the field gets a 1, if not it gets a 0. So what I am trying to achieve is a total count of all the orders in a given year and also a count of all the orders in that year that meet this certain criteria). I have this set up as two fields, Orders1 and Orders2. In separate queries each of these works just fine, but I cannot place them both in the same query (I get the same number for each field) and I cannot leave them as separate queries then combine the responses in a report (report will not do that). Any suggestions? Thank you.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,626
    Build a report.

    You can probably use report grouping & sorting features with aggregate calcs in group and report header/footer sections to display totals. Can even have a calc that is conditional on some value.

    Base the report RecordSource on the raw query (no summation) then do calcs in header/footer sections.
    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.

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

Similar Threads

  1. Query Criteria
    By Texaine in forum Queries
    Replies: 1
    Last Post: 01-24-2018, 02:36 PM
  2. Query Criteria
    By Taximan in forum Queries
    Replies: 2
    Last Post: 01-22-2012, 01:41 AM
  3. Query Criteria
    By Daryl2106 in forum Access
    Replies: 12
    Last Post: 01-09-2012, 07:33 PM
  4. Replies: 1
    Last Post: 07-13-2011, 11:00 AM
  5. query criteria
    By combine21 in forum Queries
    Replies: 1
    Last Post: 11-08-2010, 12:21 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