Results 1 to 3 of 3
  1. #1
    zipaway is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    53

    Query that joins two tables and determines if there is a new date

    Hello I have the following Query:




    Click image for larger version. 

Name:	Capture.PNG 
Views:	8 
Size:	13.1 KB 
ID:	17692

    I would like to get Expr1 working but it keeps giving me an error (You tried to execute a query that does not include the expression 'Change_Number' as part of an aggregate function).

    The query ChangeOrder_CheckForNewDate has multiple entries for each project (Number of shipments). That Expr1 should sum up the Falses/True and if there is at least one True it should output True.

    Any help would be greatly appreciated.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    A query using aggregate functions must be an aggregate (GROUP BY) Totals query.

    Summing true/false field will result in either 0 or negative because a true is -1 and false is 0.

    Click Totals on the ribbon Design tab. Choose Sum under the NewDate field and criteria: <>0
    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
    zipaway is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Posts
    53
    Quote Originally Posted by June7 View Post
    A query using aggregate functions must be an aggregate (GROUP BY) Totals query.

    Summing true/false field will result in either 0 or negative because a true is -1 and false is 0.

    Click Totals on the ribbon Design tab. Choose Sum under the NewDate field and criteria: <>0
    Thanks for your help, I fixed it.

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

Similar Threads

  1. Replies: 11
    Last Post: 11-08-2013, 06:14 PM
  2. Table Relationship Types (What determines?)
    By dccjr in forum Database Design
    Replies: 2
    Last Post: 05-03-2013, 07:04 AM
  3. joins based on date range
    By broecher in forum Database Design
    Replies: 4
    Last Post: 11-04-2011, 06:32 PM
  4. Combo Box Determines Radio Button Selected
    By sainttomn in forum Forms
    Replies: 5
    Last Post: 08-10-2011, 03:51 PM
  5. Replies: 7
    Last Post: 01-28-2011, 11: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