Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP!!! Grouping Levels and Summaries

Status
Not open for further replies.

MadJock

Programmer
May 25, 2001
318
GB
Hi,

This is driving me bonkers! I have created a report that is has the following structure:

MANAGER HEADER
EMPLOYEE HEADER
MONTH HEADER (sickdays, special)
detail (criteria, score)
MONTH FOOTER
EMPLOYEE FOOTER
MANAGER FOOTER

In the MONTH header, i have a textbox called txtMonthScore. This is based on a calculation involving the sum of the score (from detail section) and also the fields sickdays and special.

In the employee footer, I want to perform a calculation based on the average of txtMonthScore. When I create a textbox with control source '=AVG([txtMonthScore])', I am asked to input the value of txtMonthScore in an input box when the report runs. However, If I miss out the calculation and leave the control source as '=[txtMonthScore]', the Access will recognise the textbox and display the most recent value it held.

Can anyone offer any advice???

Thanks in advance,

Graeme Taylor website:
 
When computing a total with an aggregate function such as Sum you can't use the name of a calculated control in the Sum function. You must repeat the expression in the calculated control. So, repeat the calculation in your footer that appears in txtMonthScore.


 
Thanks CosmoCramer,

Unfortunately, I cannot add all the values and do the calculation at the end. The function in the detail section adjusts the value that will be averaged at the end. The adjustment is not always the same, so adjusting the totals would not be accurate.

Any other suggestions?

Thanks again website:
 
After some more thought, it appears that what you are looking to do may be possible with a little bit of code. Can you give me more details of what your calculation is?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top