Results 1 to 7 of 7
  1. #1
    djokatore is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2015
    Posts
    5

    Calculation between two query fields problem


    Hello everyone, I have problem with my query calculation.
    Problem is when I want to sum columns from query 1 and column from query 2 and to display results in query 3 they give me results only for fields which is filled.
    If I want to sum field from query 1 with field from query 2(not exist, no value) I do not get any result in query 3.
    I want that every non-value fields in query 1/2 that are not inserted behave as 0 until their value is entered in the linked table.
    Thanks
    Attached Thumbnails Attached Thumbnails 3.png   2.png   1.png  

  2. #2
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    try nz([field],0) to replace null values with 0
    if that doesn't work then
    iif(isnull[field],0,[field])

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Review http://allenbrowne.com/QueryPerfIssue.html

    James, missing () for the IsNull() function.
    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.

  4. #4
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    thanks june
    iif(isnull([field]),0,[field])

  5. #5
    djokatore is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2015
    Posts
    5
    it is not work,in which query of those three i must insert this function?
    I want to show me all the factors of the operation although they are not collected
    for example,
    1 + 1 = 2
    2 + non existing field = 2
    no existing field + 3 = 3
    in my case only
    1 + 1 = 2
    wherever there is no value for the field there in the final query not show any result or withdraws ID field for one that has a value in one of the query. only withdrawn ID for one that has a value in both query.

  6. #6
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    You might not be joining the queries correctly.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If you want to provide db for analysis, follow instructions at bottom of my post.
    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. Replies: 6
    Last Post: 08-06-2013, 02:31 PM
  2. Calculation Field in table vs Query calculation
    By Leonidsg in forum Database Design
    Replies: 18
    Last Post: 02-28-2013, 09:38 PM
  3. Another calculation problem
    By stryder09 in forum Access
    Replies: 8
    Last Post: 03-08-2011, 03:11 PM
  4. another calculation problem
    By stryder09 in forum Access
    Replies: 15
    Last Post: 02-11-2011, 04:53 PM
  5. Calculation problem
    By cometdragon in forum Queries
    Replies: 2
    Last Post: 07-28-2010, 08:54 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