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!

Report group sum works max doesn't 1

Status
Not open for further replies.

-cush-

Programmer
Feb 18, 2004
145
US
I have a report within MS Access that has a group. The group header has a text box that uses the following formula to show the average Hours:Minutes:Seconds

=Format(Int(Sum([QDuration])/Count(*)/3600),"00") & ":" & Format((Sum([QDuration])/Count(*)/86400),"nn:ss")

It works great. However I have another text box that is very similar to show the maximum Hours:Minutes:Seconds

=Format(Int(Max([QDuration])/3600),"00") & ":" & Format((Max([QDuration])/86400),"nn:ss")

Unfortunately the result is "#Type!". So I modified it to just show =Max([QDuratioin]) and the result was Chinese characters. So I changed it to just [QDuration]. Still Chinese. I'm afraid I only understand English.
 
What are some sample values of QDuration?
Have you attempted to create a new test report with nothing but these calculations?
Have you attempted to limit the records in the report to isolate a possible data issue?

Duane
Hook'D on Access
MS Access MVP
 
Sample values: 560, 181, 90, 235
The field represents the number of seconds someone waited on hold.

I have not created a separate report. I will try that.

As far as limiting the values I try that. Right now the SUM calculation works on the same data though. Just not the MAX.

Thanks.
 
I just tested this using the same exact expressions you used and had no issue with the display of the numbers. I would attempt to
- compact and repair the file or
- rebuild the report or
- create a new file and import everything

Duane
Hook'D on Access
MS Access MVP
 
The data is from linked tables using version 5.1 of the MySQL ODBC driver. I think it may somehow be part of the issue. I am now using a query to group the data first instead of doing the grouping within the report and that seems to be resolving the issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top