Results 1 to 8 of 8
  1. #1
    cap.zadi is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481

    Error of Sum at Form!

    Hi,

    I have two fields at form "TxtQtyA" and "TxtQtyB" which resulted from a Query after counting of records (Number field at Table level).

    Its showing " #Error" on both horizontal sum and vertical sum.

    Horizontal Sum!
    =Sum(Nz([TxtQtyA],0)+Nz([TxtQtyB],0))

    Vertical Sum at form footer.


    =Sum(Nz([TxtQtyA],0))

    Normally, this should not show the error as i have done in many other forms but whats different here then?>

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Aggregate function must reference field not control.

    TxtQtyA and TxtQtyB are fields in query?
    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
    cap.zadi is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Yes both are resulted from one field via CrossTab query.

    Its showing footer sum at this query level but not at form.

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Remove the Sum part for the horizontal calculation
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  5. #5
    cap.zadi is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Hi,

    Its working fantastic for the horizontal sum without Sum sign.

    How about the vertical sum?

    I removed but its taking the value of first top line as it is.

  6. #6
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    I didn't answer that as its not obvious why its not working.
    That's three not's in one sentence!

    Can you show the report in design view . It may help.
    Also provide the report record source.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Can Remove the NZ() as Sum() function will ignore Null.

    Although that is probably not cause of issue.

    Why use a form for CROSSTAB query? Cannot edit data.
    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.

  8. #8
    cap.zadi is offline Competent Performer
    Windows 10 Access 2013 64bit
    Join Date
    May 2011
    Location
    KSA
    Posts
    481
    Well, its the form to just display the data at main dash board.

    The cross tab query to bring the two counted results as column heading.

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

Similar Threads

  1. Replies: 6
    Last Post: 03-17-2016, 02:10 PM
  2. Replies: 14
    Last Post: 03-31-2015, 05:20 PM
  3. Replies: 1
    Last Post: 11-18-2014, 12:35 PM
  4. Replies: 10
    Last Post: 10-22-2013, 07:35 AM
  5. Replies: 0
    Last Post: 07-16-2012, 05:42 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