Results 1 to 10 of 10
  1. #1
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 97
    Join Date
    Mar 2010
    Posts
    91

    Sum of calculated fields


    Hello,

    I'm new to this forum and pretty new to accces. I have taken some classes but still a greenhorn.

    I have ran into a problem. On a form I have a control that calculates the amount of a line item =([Length])*([width])*[sqftPrice]. works fine. Then what I need is the Sum of those Calculated amounts. I get a #Name? when i do a =sum([calculatedfield])

    Any help is appreciated. I have to use access 97 for legacy purposed.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You have to repeat the calculation or move it to the query:

    http://support.microsoft.com/kb/207763
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 97
    Join Date
    Mar 2010
    Posts
    91

    hmmm

    when I try =Sum(([length]*[width])*[sqftprice])

    I still get the #Name?

    thanks for the help

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Make sure none of the controls has the same name as the field, which unfortunately is exactly what the wizard will do. In other words, if you have a textbox named length, change it to txtLength or something.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 97
    Join Date
    Mar 2010
    Posts
    91
    I did that the first time. The wizard creates this like "length label" and width label" to destiguish. Just to make sure though I did change the names to be a little more descriptive(txtlengh and txtwidth). I updated the expressions in the sum() with no luck. Still getting #name?

    again. Thanks

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You changed the names of the textboxes, or the labels? Can you post the db?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 97
    Join Date
    Mar 2010
    Posts
    91

    uploaded some screenshots

    I changed the names of the text boxes, not the labels

    db is too large to upload here. I've attached some screenshots.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    You want the field names in your sum, not the textbox names. I had you change the textbox names because Access can get confused and error when they're the same.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  9. #9
    nkuebelbeck is offline Advanced Beginner
    Windows 7 Access 97
    Join Date
    Mar 2010
    Posts
    91

    very cool

    =Sum(((([Length]*[Width])/144)*[Price Per Sqft])*[Quantity])

    After changing the txtboxes and pulling the db fields it worked.

    Much thanks. !

  10. #10
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    No problem, and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Calculated Field in continuous form
    By doobybug in forum Forms
    Replies: 2
    Last Post: 11-15-2009, 08:54 AM
  2. Calculated and send to totals. Question
    By castellano in forum Programming
    Replies: 1
    Last Post: 06-12-2009, 12:40 PM
  3. many decimal places in calculated fields
    By GordS in forum Access
    Replies: 1
    Last Post: 02-04-2009, 11:12 AM
  4. Control source and calculated values
    By meistersteff in forum Forms
    Replies: 0
    Last Post: 11-23-2007, 07:04 PM
  5. calculated sum not working!
    By Linda Gamble in forum Access
    Replies: 1
    Last Post: 10-12-2007, 06:38 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