Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2004
    Posts
    75

    Unanswered: Sum() a calculated field

    hi, I am trying to Sum a field on a continuous form. This field is the result of other calculations in a few other fields. In Access help, it says that you can't use Sum() on a calculated field...no worries I thought, I just figured out what all the other calculations were to arrive at the result in the field I want to Sum and came up with:
    =(([FOBPrice]/[FOREX])+(((([FreightCharges]/[FOREX])+[CustomsCharges])/18)/Forms!frmStockCost!QuantityPerCrate.Value))*[Quantity]
    which works fine by itself (ie. it gives the same result as the field does now from being calculated step-by-step through other fields) but as soon as I move the field up to the form header and add the Sum() around it, I get #Error in the field.
    From reading MS Support at http://support.microsoft.com/default...B;EN-US;207763 I figure I need to do the calculation in a query rather than in the textbox on the form, but I'm not sure how to do this...any suggestions? Thanks

  2. #2
    Join Date
    Oct 2004
    Posts
    75
    ahhh bonza, never mind thanks anyway ppl, it's working now. First I didn't have a GROUP BY line in the query which it apparently needs, then for some reason it didn't work on the form until I dragged a textbox onto it from the expression on the field list (rather than typing in the expression name into the control source of an existing textbox...)

Posting Permissions

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