Results 1 to 2 of 2
  1. #1
    radguy is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2014
    Posts
    32

    Using Queries to sum times of similar types together

    I am having trouble summing times with similar types.



    As you can see from this pic, I have the same type of tool but different ID Numbers. Is there a way to sum the total hours waiting for each ToolType and not Tool ID Number? As you can see when I try to sum the total hours waiting, I get the error message 'data type mismatch in criteria expression.'

    Click image for larger version. 

Name:	GroupTimesTogether.JPG 
Views:	6 
Size:	61.3 KB 
ID:	17540

    Click image for larger version. 

Name:	Group Times.JPG 
Views:	6 
Size:	69.3 KB 
ID:	17541

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    remove [Tool ID Number] from the query.
    If you still get the error, then you have strings in the sum hrs calc. (hence Data type mismatch)

    Try sum(Nz([hrs]) ) to ignore nulls.

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

Similar Threads

  1. Combine Similar Data From Three Queries
    By Kerberos in forum Reports
    Replies: 2
    Last Post: 05-02-2014, 11:27 AM
  2. Totals queries with multiple product types
    By mike_980 in forum Queries
    Replies: 1
    Last Post: 03-28-2014, 01:42 PM
  3. Replies: 4
    Last Post: 05-10-2012, 11:42 AM
  4. Replies: 5
    Last Post: 12-23-2011, 05:44 PM
  5. Replies: 7
    Last Post: 10-25-2011, 08:32 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