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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I code a calc on a report

Status
Not open for further replies.

dab1477

Technical User
Mar 4, 2011
33
US
I am trying to do the flowing when I run a report that displays a Group format:

I've included a sample page of my report - attached

I want to alter the Grand Total Sum calculation to show
Sum of SHIPPING (both shifts) / Grand Total of manhours

I.E. I ONLY want the Sum of Shipping - NOT all Dept sums as Calculated in Summary data - divided by the Grand Total of ALL dept manhours.

I have the following code:

Option Compare Database

Dim HPOCAlc As Integer

If Group_of_Dept_or_loc = "Shipping" Then
HPOCAlc = Sum((Total_Good_Order) / Total_Manhours_Grand_Total_Sum)
End If
End Sub

As a newbie, I'm missing something. Unsure of what. I also know this could be done via query, but was unable to get that to work, and then would not necessarily understand how to get to a report, which is why I chose to do the calc directly on the report.

Open to suggestions. Thanks,
dab1477
 

hi,

If this is MS Access then you might get better results posting in forum703.

Otherwise, what application?

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Access 2010. I will post in other forum. Thanks. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top