Results 1 to 8 of 8
  1. #1
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55

    Calculating a Percentage

    I have a report with a subform that totals the number of ts processed and then in the report a report header that totals the number of errors. I need to come up with a percentage from the two totals. I have created a text box and added the formula.



    =[SumErrors]/Forms![Sum of TimeSheets Processed]![SumOfTimesheets in Package]

    The forumla. Any suggestions?

    Thank you!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you trying to refer to your Report or SubReport or some Form somewhere?

  3. #3
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55
    Quote Originally Posted by Alaska1 View Post
    I have a report with a subform that totals the number of ts processed and then in the report a report header that totals the number of errors. I need to come up with a percentage from the two totals. I have created a text box and added the formula.

    =[SumErrors]/Forms![Sum of TimeSheets Processed]![SumOfTimesheets in Package]

    The forumla. Any suggestions?

    Thank you!
    The Sum of errors is in a report where the sum of timesheets processed is in a form that was added as subform to the report.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You do not go through the Forms collection for the data. You can reference the control directly
    =SumErrors/YourSubReportControlName.[SumOfTimesheets in Package]
    ...remembering that the SubReportControlName need not be the same as the SubReport it is displaying.

  5. #5
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55
    Quote Originally Posted by RuralGuy View Post
    You do not go through the Forms collection for the data. You can reference the control directly
    =SumErrors/YourSubReportControlName.[SumOfTimesheets in Package]
    ...remembering that the SubReportControlName need not be the same as the SubReport it is displaying.

    I am still having a problem with this calculation. I am using the subreportcontrolname. I have checked to make sure I am using the correct subreport name. I called it TimesheetReport. The other field I am trying to divide by is called SumErrors but the control source is =Sum([CountOfTimeSheetErrors]) which is in the main report

    Not sure why I am not able to come up with a value.

    =SumErrors/[Timesheet Report].[SumOfTimesheets in Package]

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The items in RED are not the same!
    Quote Originally Posted by Alaska1 View Post
    I am still having a problem with this calculation. I am using the subreportcontrolname. I have checked to make sure I am using the correct subreport name. I called it TimesheetReport. The other field I am trying to divide by is called SumErrors but the control source is =Sum([CountOfTimeSheetErrors]) which is in the main report

    Not sure why I am not able to come up with a value.

    =SumErrors/[Timesheet Report].[SumOfTimesheets in Package]

  7. #7
    Alaska1 is offline Advanced Beginner
    Windows Vista Access 2003
    Join Date
    Oct 2010
    Posts
    55
    Quote Originally Posted by RuralGuy View Post
    The items in RED are not the same!
    That was an error. I did not have a space bewtween Timesheet Report in my forumla.

    Thank you for all your help.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    As a test I would start with:
    =SumErrors
    ...and see what I got and then...
    =[TimesheetReport].[SumOfTimesheets in Package]
    ...and make sure the reference is correct and the value is correct.

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

Similar Threads

  1. Replies: 3
    Last Post: 12-01-2010, 12:30 PM
  2. Percentage Calculation in a Query
    By Lynn in forum Queries
    Replies: 1
    Last Post: 07-16-2010, 11:23 PM
  3. How to calculate a percentage on form
    By jrockusa in forum Forms
    Replies: 1
    Last Post: 03-31-2010, 01:53 PM
  4. Percentage Queries
    By bangemd in forum Queries
    Replies: 18
    Last Post: 05-21-2009, 09:32 AM
  5. percentage in a query
    By Peljo in forum Access
    Replies: 2
    Last Post: 02-27-2008, 10:51 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