Results 1 to 10 of 10
  1. #1
    andrebmsilva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19

    Sum of field not retrieving 0 value when needed

    Hi,

    I have a log. I analize it via queries. I want to sum the field Expr2 , but sometimes there are no events. I wish when that happens the value would be 0.
    Any sugestions?

    I have tried:
    Nz(Sum([Soma 3 from Completed Turno A].Expr2),0)
    Sum(Nz([Soma 3 from Completed Turno A].Expr2),0)



    None have worked... what am i missing?


    THanks
    Attached Files Attached Files
    Last edited by andrebmsilva; 04-01-2013 at 09:05 AM.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Can you post a copy of the db in A2003 mdb format.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    andrebmsilva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19
    Quote Originally Posted by Bob Fitz View Post
    Can you post a copy of the db in A2003 mdb format.
    Here it is

    Dúvida Zero.mdb

  4. #4
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I want to sum the field Expr2
    In which query.
    I have tried:
    Nz(Sum([Soma 3 from Completed Turno A].Expr2),0)
    Sum(Nz([Soma 3 from Completed Turno A].Expr2),0)
    Where have you tried these expressions
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  5. #5
    andrebmsilva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19
    In "Soma 3 from Completed Resultado TA"

  6. #6
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I'm a bit confused. The query called "Soma 3 from Completed Resultado TA" returns a value of 74. So what's the problem.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  7. #7
    andrebmsilva is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2012
    Posts
    19
    Click image for larger version. 

Name:	Capture.JPG 
Views:	3 
Size:	14.0 KB 
ID:	11789
    This is what i see... a null field... what is happening?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Don't know. I also see 74.
    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.

  9. #9
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    I see 74 also.

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849

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

Similar Threads

  1. Retrieving records according to criteria
    By jruizmesa in forum Forms
    Replies: 2
    Last Post: 03-24-2012, 11:43 AM
  2. Replies: 1
    Last Post: 03-17-2012, 08:49 PM
  3. Retrieving PDF's Efficiently
    By tcheck in forum Access
    Replies: 3
    Last Post: 08-05-2011, 07:30 AM
  4. Combo Box field selection help needed
    By techexpressinc in forum Forms
    Replies: 8
    Last Post: 04-01-2010, 09:42 AM
  5. SQL- retrieving info
    By jmarti57 in forum Programming
    Replies: 0
    Last Post: 12-10-2008, 03:05 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