Time is not calculating correctly in Access 2000 report.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report I am pulling from an Access 2000 table with a "Total Time"
field. When I add a unbound textbox and try using =Sum([Total Time]) the
calculation is incorrect. I'm getting a much lower total time amount than I
should be seeing. I'm not a VB coder so I only use simple formulas.
 
Can you give us an example? What is "Total time"? What are the entries
listed on the report? Is it in the detail section, the footer, etc? Where
is your "=SUM(Total Time)" entry - report footer, group footer, etc.? What
is showing up there?

More details please.
 
I'm sorry. The total time textbox is suppose to total how much overall time
was spent on one particularcost center code. I have a cost center header and
footer on my report. I have place an unbound textbox in the cost center
header using =Sum([Total Time]) to total all time calculated for that cost
center code. When I run the report I actually get results but the results
are lower than the total amount should be. Say the total time is actually
187:00 hours the time that produces on the report only shows as 4:00 hours.

Rick B said:
Can you give us an example? What is "Total time"? What are the entries
listed on the report? Is it in the detail section, the footer, etc? Where
is your "=SUM(Total Time)" entry - report footer, group footer, etc.? What
is showing up there?

More details please.

--
Rick B



Carolyn said:
I have a report I am pulling from an Access 2000 table with a "Total Time"
field. When I add a unbound textbox and try using =Sum([Total Time]) the
calculation is incorrect. I'm getting a much lower total time amount than
I
should be seeing. I'm not a VB coder so I only use simple formulas.
 
Carolyn said:
I have a report I am pulling from an Access 2000 table with a "Total Time"
field. When I add a unbound textbox and try using =Sum([Total Time]) the
calculation is incorrect. I'm getting a much lower total time amount than I
should be seeing. I'm not a VB coder so I only use simple formulas.


The problem is that you are treating durations as time of
day values when you sum and format 3 hours as if it were
3am.

Assuming that your Total Time field (in the table) is type
Date (odd, but not impossible to deal with), use an
expression like this to display the total:

=Format(24 * Sum([Total Time]), "0") & Format((24 * 60 *
Sum([Total Time])) Mod 60, "\:00")
 
Thanks Marshall,

That didn't seem to work. If it helps I just created a crosstab query and
get the same results. I have one cost center code that received 187 hours
total time worked and it is showing the work hours as 4.25 hours.

Marshall Barton said:
Carolyn said:
I have a report I am pulling from an Access 2000 table with a "Total Time"
field. When I add a unbound textbox and try using =Sum([Total Time]) the
calculation is incorrect. I'm getting a much lower total time amount than I
should be seeing. I'm not a VB coder so I only use simple formulas.


The problem is that you are treating durations as time of
day values when you sum and format 3 hours as if it were
3am.

Assuming that your Total Time field (in the table) is type
Date (odd, but not impossible to deal with), use an
expression like this to display the total:

=Format(24 * Sum([Total Time]), "0") & Format((24 * 60 *
Sum([Total Time])) Mod 60, "\:00")
 
I need to see exactly (use Copy/Paste) what expression you
actually used.

Also add a text box (next to the one we are working on) with
the expression =Sum([Total Time]) and no formatting.
Include the value it displays in your reply.

Please don't confuse things any further by throwing a
crosstab query into the mix.
--
Marsh
MVP [MS Access]

That didn't seem to work. If it helps I just created a crosstab query and
get the same results. I have one cost center code that received 187 hours
total time worked and it is showing the work hours as 4.25 hours.

Marshall Barton said:
Carolyn said:
I have a report I am pulling from an Access 2000 table with a "Total Time"
field. When I add a unbound textbox and try using =Sum([Total Time]) the
calculation is incorrect. I'm getting a much lower total time amount than I
should be seeing. I'm not a VB coder so I only use simple formulas.


The problem is that you are treating durations as time of
day values when you sum and format 3 hours as if it were
3am.

Assuming that your Total Time field (in the table) is type
Date (odd, but not impossible to deal with), use an
expression like this to display the total:

=Format(24 * Sum([Total Time]), "0") & Format((24 * 60 *
Sum([Total Time])) Mod 60, "\:00")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top