sum the calculated time for each group

G

Guest

I'm having a problem totaling the total hours of worked in my report please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return to 0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html
 
G

Guest

Thank you very much, but the result turn 00 when I instate "h" to "n", and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count more
than 12, look like if the total is 26 hours it will take away 12 hours and 12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

Allen Browne said:
DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return to
0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and display
it on the report.

We have no idea what is in your HoursAndMinutes() function.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Thank you very much, but the result turn 00 when I instate "h" to "n", and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count more
than 12, look like if the total is 26 hours it will take away 12 hours and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

Allen Browne said:
DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


Dee said:
I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return to
0:00
on my report. The total column I created from query.
Thank
 
G

Guest

Hi,
yes, they are in Date/Time type fields, and I did it work on query, it turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

Allen Browne said:
Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and display
it on the report.

We have no idea what is in your HoursAndMinutes() function.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Thank you very much, but the result turn 00 when I instate "h" to "n", and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count more
than 12, look like if the total is 26 hours it will take away 12 hours and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

Allen Browne said:
DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return to
0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

Try the expressions on the web page in the Control Source of the text box on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text box
cannot be named Start_Time or End_Time.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

Allen Browne said:
Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Dee said:
Thank you very much, but the result turn 00 when I instate "h" to "n",
and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count
more
than 12, look like if the total is 26 hours it will take away 12 hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return
to
0:00
on my report. The total column I created from query.
Thank
 
G

Guest

Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

Allen Browne said:
Try the expressions on the web page in the Control Source of the text box on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text box
cannot be named Start_Time or End_Time.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

Allen Browne said:
Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to "n",
and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count
more
than 12, look like if the total is 26 hours it will take away 12 hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return
to
0:00
on my report. The total column I created from query.
Thank
 
G

Guest

Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

Allen Browne said:
Try the expressions on the web page in the Control Source of the text box on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text box
cannot be named Start_Time or End_Time.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

Allen Browne said:
Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to "n",
and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count
more
than 12, look like if the total is 26 hours it will take away 12 hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return
to
0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

The minutes should only be negative if an event ends before it starts.

If you are doing that to indicate an event the ends on the next day (e.g.
starts 11pm and ends 1am the next day), you could add 1440 minutes to
compensate for the change of date. Something like this:

=IIf(DateDiff("n", [StartDateTime], [EndDateTime]) < 0, DateDiff("n",
[StartDateTime], [EndDateTime]) + 1440,
DateDiff("n", [StartDateTime], [EndDateTime]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

DeeNguyen said:
Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

Allen Browne said:
Try the expressions on the web page in the Control Source of the text box
on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text
box
cannot be named Start_Time or End_Time.


Dee said:
Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

:

Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the
query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to
"n",
and
another it give me the diff total. Actually I have a function name
call
HoursAndMinutes, the total just take off every 12 hours when it
count
more
than 12, look like if the total is 26 hours it will take away 12
hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as
zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my
report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it
return
to
0:00
on my report. The total column I created from query.
Thank
 
G

Guest

Thank you for respond, it works very well, and....I am having about an avege,
I have total cases column, and total time column, which fomula +[Minutes]
example
Cases Total
aaa .10
bbb 030
=Count(*) =[Minutes]...
and I don't know about fomula to put it in.
I appreciate you help.
Dee


Allen Browne said:
The minutes should only be negative if an event ends before it starts.

If you are doing that to indicate an event the ends on the next day (e.g.
starts 11pm and ends 1am the next day), you could add 1440 minutes to
compensate for the change of date. Something like this:

=IIf(DateDiff("n", [StartDateTime], [EndDateTime]) < 0, DateDiff("n",
[StartDateTime], [EndDateTime]) + 1440,
DateDiff("n", [StartDateTime], [EndDateTime]))

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

DeeNguyen said:
Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

Allen Browne said:
Try the expressions on the web page in the Control Source of the text box
on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text
box
cannot be named Start_Time or End_Time.


Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

:

Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the
query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to
"n",
and
another it give me the diff total. Actually I have a function name
call
HoursAndMinutes, the total just take off every 12 hours when it
count
more
than 12, look like if the total is 26 hours it will take away 12
hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as
zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my
report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it
return
to
0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

Probably easiest the save the first query. Then create another query that
operates on the first one. Depress the Total button on the toolbar, and you
can Group By the aaa/bbb field, and Sum or Average the Minutes field.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

DeeNg said:
Thank you for respond, it works very well, and....I am having about an
avege,
I have total cases column, and total time column, which fomula +[Minutes]
example
Cases Total
aaa .10
bbb 030
=Count(*) =[Minutes]...
and I don't know about fomula to put it in.
I appreciate you help.
Dee


Allen Browne said:
The minutes should only be negative if an event ends before it starts.

If you are doing that to indicate an event the ends on the next day (e.g.
starts 11pm and ends 1am the next day), you could add 1440 minutes to
compensate for the change of date. Something like this:

=IIf(DateDiff("n", [StartDateTime], [EndDateTime]) < 0, DateDiff("n",
[StartDateTime], [EndDateTime]) + 1440,
DateDiff("n", [StartDateTime], [EndDateTime]))


DeeNguyen said:
Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn
to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

:

Try the expressions on the web page in the Control Source of the text
box
on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not
the
same as the name of one of your fields. For example the calculated
text
box
cannot be named Start_Time or End_Time.


Hi,
yes, they are in Date/Time type fields, and I did it work on query,
it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

:

Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the
query.
Once you have it working there, it will be very easy to sum that
and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to
"n",
and
another it give me the diff total. Actually I have a function
name
call
HoursAndMinutes, the total just take off every 12 hours when it
count
more
than 12, look like if the total is 26 hours it will take away 12
hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as
zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60,
"\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my
report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it
return
to
0:00
on my report. The total column I created from query.
Thank
 
G

Guest

this works: you need 2 values, starttime and endtime; then, elapsed
time=((hour(endtime)+minute(endtime)/60))-((hour(endtime)+minute(endtime)/60)).
if endtime is earlier than starttime, i.e. a night shift starting at 10pm and
ending at 6am, you then need to add 24 hours to get the elapsed time.
 
G

Guest

I am having a problem on the total column report . How can get the total on
the report if I used crosstab query and the crosstab query is minutes:
DateDiff("n" , [startDateTime], [EndDateTime])

Thank

DeeNg said:
Good morning Allen,
Thank you a million time for you help. It works, but the minutes turn to
negative if it greater than 190 minutes. I appreciate you value time.
DeeNguyen

Allen Browne said:
Try the expressions on the web page in the Control Source of the text box on
your report.

They start with "=".

If they still error, then make sure the Name of this text box is not the
same as the name of one of your fields. For example the calculated text box
cannot be named Start_Time or End_Time.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Dee said:
Hi,
yes, they are in Date/Time type fields, and I did it work on query, it
turn
to minutes, and the report based on that query when I enter the
formula=Minutes.... the result is Errors. I appreciate your help.
Thank

:

Are Start_Time and End_Time fields in a table?
Are they Date/Time type fields?

Try the link: it explains how to calculate the difference in the query.
Once you have it working there, it will be very easy to sum that and
display
it on the report.

We have no idea what is in your HoursAndMinutes() function.


Thank you very much, but the result turn 00 when I instate "h" to "n",
and
another it give me the diff total. Actually I have a function name call
HoursAndMinutes, the total just take off every 12 hours when it count
more
than 12, look like if the total is 26 hours it will take away 12 hours
and
12
hours until it = 2hours, if less than 12 it ok
1:00
2:00
1:00
Iam ok but
8:00
8:00
9:00
the result is 1:00 and my expression is
=HoursAndMinutes(Sum([End_Time])-([Start_Time]))
Thank again for your time.

:

DateDiff("h"...) gives you whole hours only, so 0:59 counts as zero.

Try working in minutes:
=Sum(DateDiff("n", [Start_Time], [End_Time]))

If you need to see that as hours and minutes:
=Str(Sum(DateDiff("n", [Start_Time], [End_Time])) \ 60) &
Format(Sum(DateDiff("n", [Start_Time], [End_Time])) Mod 60, "\:00")

Explanation of how that works:
http://allenbrowne.com/casu-13.html


I'm having a problem totaling the total hours of worked in my report
please
if you know i would appreciate your help.
my total column such as
0:15
1:20
0:30
____
and my sytax is=Sum(DateDiff("h",Start_Time,End_Time)) and it return
to
0:00
on my report. The total column I created from query.
Thank
 
A

Allen Browne

If this is supposed to be the total for all the columns in the report, you
can add a total column to the crosstab itself.

In a fresh column of the crosstab query, enter:
Field: MyTotal:DateDiff("n" , [startDateTime], [EndDateTime])
Total: Sum
Crosstab: Row Heading
 
G

Guest

Thank you, but what do I do when I have this
on the report I used =[paper] \60 & format( [paper] Mod 60, "\:00") it give
me the correct on column paper but when i instead of paper by Electronic on
Electronic column it give me an errors.
Thank you for your help.
Total time in Electronic total time in paper
errors .10
1:00
Allen Browne said:
If this is supposed to be the total for all the columns in the report, you
can add a total column to the crosstab itself.

In a fresh column of the crosstab query, enter:
Field: MyTotal:DateDiff("n" , [startDateTime], [EndDateTime])
Total: Sum
Crosstab: Row Heading

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

DeeNg said:
I am having a problem on the total column report . How can get the total on
the report if I used crosstab query and the crosstab query is minutes:
DateDiff("n" , [startDateTime], [EndDateTime])
 
A

Allen Browne

You will not be able to sum that expression in teh report, but if the query
has a field named "paper" which contains the number of minutes, you could
place a text box in the Report Footer section and show the total by setting
its Control Source to:
=Sum([paper]) \60 & format( Sum([paper]) Mod 60, "\:00")

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

DeeNg said:
Thank you, but what do I do when I have this
on the report I used =[paper] \60 & format( [paper] Mod 60, "\:00") it
give
me the correct on column paper but when i instead of paper by Electronic
on
Electronic column it give me an errors.
Thank you for your help.
Total time in Electronic total time in paper
errors .10
1:00
Allen Browne said:
If this is supposed to be the total for all the columns in the report,
you
can add a total column to the crosstab itself.

In a fresh column of the crosstab query, enter:
Field: MyTotal:DateDiff("n" , [startDateTime],
[EndDateTime])
Total: Sum
Crosstab: Row Heading


DeeNg said:
I am having a problem on the total column report . How can get the total
on
the report if I used crosstab query and the crosstab query is minutes:
DateDiff("n" , [startDateTime], [EndDateTime])
 

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

Top