Results 1 to 2 of 2
  1. #1
    mmethe is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Apr 2018
    Posts
    5

    Sum of a calculated control

    Hello All,

    I am must be missing something simple. I want to sum the values in a calculated field.

    Gallons is a number
    Price per gallon is currency
    total is gallons x price per gallon (not stored, it is calculated on the report)

    I want to SUM the TOTAL
    Click image for larger version. 

Name:	cap1.PNG 
Views:	11 
Size:	6.1 KB 
ID:	38504

    I tried =Sum([total]) but is does not work. When I open the report I am prompted for that value

    Any ideas?

    Thanks,


    -Mike M

  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,900
    Aggregate functions must reference fields, not controls. So options are:

    1. do the total calc in query and reference that constructed field

    2. repeat the calc within the SUM() function: =Sum(quantity * price)
    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. Suming a calculated unbounded control
    By George in forum Reports
    Replies: 1
    Last Post: 09-13-2017, 09:51 PM
  2. Sort query a by a calculated control
    By gg80 in forum Queries
    Replies: 4
    Last Post: 10-01-2015, 05:40 PM
  3. Calculated control on Continuous Form
    By Mtyetti2 in forum Forms
    Replies: 2
    Last Post: 03-25-2013, 05:13 PM
  4. Calculated control help
    By cici in forum Forms
    Replies: 4
    Last Post: 05-16-2010, 12:04 AM
  5. Control source and calculated values
    By meistersteff in forum Forms
    Replies: 0
    Last Post: 11-23-2007, 07:04 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