Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    5

    Unanswered: Calculated total OK in report but not on form ??

    Microsoft Access 2002 and 2003

    I have a report in which I have a calculated grand total. This is in the report header and works well.

    =Sum(qry_ItemCatValue![SG Value])

    "SG Value" is the product of two fields calculated in the query

    If I cut and paste this expression into the control source of a text box in a form header all I get is #error. I expected it to work.

    I guess I am doing something silly but can someone please tell me what that may be

    John

  2. #2
    Join Date
    Apr 2004
    Location
    Derbyshire, UK
    Posts
    789
    Provided Answers: 1
    Hi

    Quick question, is the record source for the form and report the same ?

    MTB

  3. #3
    Join Date
    Oct 2007
    Posts
    5
    Thanks for the quick reply
    No.
    The report is getting the data from a query which gets data from two related tables.
    The form gets its data directly from a table (one of the two used by the query for the report). There is also a subform which gets it data from the other table used for the query.

    John

  4. #4
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926
    Make sure you have a field named: SG Value on the form. You can also try pasting it into a field in the Form's footer and see if that will work.

    This...
    =Sum(qry_ItemCatValue![SG Value])
    Should probably be...
    =Sum([SG Value])
    or...
    =Sum([my_Field_Name_on_the_Form_I_Want_To_Sum])
    Last edited by pkstormy; 10-15-07 at 17:23.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

Posting Permissions

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