Results 1 to 2 of 2
  1. #1

    Sub Total / Total

    I am using Access 2000. I am using a form containing three fields:
    - Film Quantity
    - Contrast Quantity
    - Exam Quantity
    Once data (a quantity) is entered into the form I have developed a related query/report combination whereby the following calculations are made:
    Cost of Film: [Film Quantity]*2
    Cost of Contrast: [Contrast Quantity]*50
    Cost of Exam: [Exam Quantity]*400
    For each of the above expressions, I am able to calculate the proper amount on the report, based on the quantity entered.

    Here is my problem: I have established another query field called - Total Cost: [Cost of Film]+[Cost of Contrast]+[Cost of Exam]. I have tried to setup the Total row as an expression or a SUM. Neither one will total the three calculated fields.

    So what am I doing wrong?

    Thanks for any help you are willing to give.

    Steven Metcalf

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: Sub Total / Total

    I'm getting a little lost in your question because of the mix of form/query/report. As I understand it, the calculated fields for Cost of Film, etc., are in the query, right?

    You say you're using a form with 3 fields, do you mean a table with 3 fields, or a form with 3 controls, and is the query based on the table or the form?

    Are you using the query as a report, or do you have a report based on the query? You cannot base a report calculated field on another calculated field, although you can base a query field on a calculated field.

    This problem isn't clear:
    <hr>I have tried to setup the Total row as an expression or a SUM. Neither one will total the three calculated fields.<hr>
    You have to set it up as an expression so if it doesn't work, what error are you getting or what are you seeing? I've found that calculated fields like
    <hr>Cost of Film: [Film Quantity]*2<hr>
    usually behave better in secondary calculations if you fully reference the field. That is, you need [TableName].[File Quantity] in the expression, where tablename is the name of the table or query that contains the File Quantity field.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts