Results 1 to 3 of 3

Thread: Totalling time

  1. #1
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120

    Unanswered: Totalling time

    Table:
    FieldName = fTotal (data type - Short Time)
    FieldName = fApproved (Yes/No)
    (+ other fields not relevant to my question)

    Query:
    Based on table

    Report based on query:
    There is a fTotal field textbox
    There is an unbound textbox to sum the fTotal
    This works great. It includes ALL totals (Approved and Not Approved)

    I would like to break out just the Approved totals in a textbox also. I am not sure if I need code to do this, or an IIf statement, etc.

    pseudocode would be: If Total is Approved(Yes) then add the total. If not, do not add it)

    Can someone guide me?

    Thank you,
    Michael

  2. #2
    Join Date
    May 2004
    Posts
    16
    Let the query do the work. Add a calculated field in the query with something like:

    =IIf(fApproved, fTotal, 0)

    You can test out the query by itself before running the report. It should have the time for approved records (True) and 0 for unapproved records (False).

    Then you can have the report use it the same way as other fields and have the report footer calculate the total.

  3. #3
    Join Date
    Mar 2002
    Location
    Sacramento, CA
    Posts
    120
    Thank you Don - it works perfectly !!!

    I really appreciate your help.

    Michael

Posting Permissions

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