Tip of the Month:  October 2007

Microsoft Access: Calculate the percentage of records in a group

Although it's easy to count the number of records in a group, determining that number's percentage of the report's overall record count may not seem easy to do. Fortunately, it's easy to calculate the percentage.

  1. Add a textbox control to the report's Detail section and name it txtCountAll.
    1. Set its Visible property to No
    2. Set its Control Source property to =Count(*)
  2. Add a textbox control the group footer and name the new control txtCountGroup
    1. Set its Visible property to No
    2. Set its Control Source property to =Count(*)
  3. Add another textbox to the group footer and name it percent.
    1. Set its Control Source property to =txtCountGroup/txtCountAll.
    2. Set its Format property to Percent.

If you have any questions regarding this tip or need help implementing it in your own projects, contact Ranelle Maltas at 472-0585 or rmaltas2@unl.edu.

Previous Tip's Home Next