Grand Total on form shows #error

M

M Skabialka

I have a form in Access 2007 which tracks employee hours on tasks. The form
shows 7 controls, SunHours, MonHours, TueHours, etc. In the footer I have
another 7 which add hours for each day as a total. e.g SumSunHours =
Sum([SunHours]). If I leave it at that it works. I then added an 8th
control WeekTotal with the source being: =Sum([SunHours] + [MonHours] +
[TueHours] + [WedHours] + [ThuHours] + [FriHours] + [SatHours])
However it reports the same week total result for every record
S M T W T F S WeekTotal
0 2 3 1 2 3 0 11
0 0 1 0 0 0 0 11
--------------------------
0 2 4 1 2 3 0 #error
I also added a grand total where I show #error above. I tried adding all
the sub-totals to the left,
=Sum([SumSunHours] + [SumMonHours] + [SumTueHours] + [SumWedHours] +
[SumThuHours] + [SumFriHours] + [SumSatHours])
and I tried =Sum([WeekTotal]). In both cases not only do I get the #error,
I also get the same #error for all day sub-totals and the week sub-totals.
If I remove the grand total control the other sub-totals show numbers, but
the addition is still wrong for the WeekTotal on subsequnet lines.

I've done a compact/repair, copied the form, removed the totals and
recreated them, etc.
Why would my subtotals for each week all show the same for different
records, and why won't the grand total work?
Mich
 
C

Chegu Tom

I have a couple of Ideas
1 in your foodter
Try adding the 7 controls you have ton your footer without the sum function

=[SumSunHours] + [SumMonHours] + [SumTueHours] + [SumWedHours] +
[SumThuHours] + [SumFriHours] + [SumSatHours])
whthout the sum function

or try a sum function on every item
=Sum([SunHours]) + sum([MonHours]) + Sum( [TueHours]) + ...............
 
M

M Skabialka

Not using Sum(...) worked - I've been working In Excel lately and had a
temporary senior moment there.
Thanks,
Mich


Chegu Tom said:
I have a couple of Ideas
1 in your foodter
Try adding the 7 controls you have ton your footer without the sum
function

=[SumSunHours] + [SumMonHours] + [SumTueHours] + [SumWedHours] +
[SumThuHours] + [SumFriHours] + [SumSatHours])
whthout the sum function

or try a sum function on every item
=Sum([SunHours]) + sum([MonHours]) + Sum( [TueHours]) + ...............


M Skabialka said:
I have a form in Access 2007 which tracks employee hours on tasks. The
form shows 7 controls, SunHours, MonHours, TueHours, etc. In the footer I
have another 7 which add hours for each day as a total. e.g SumSunHours =
Sum([SunHours]). If I leave it at that it works. I then added an 8th
control WeekTotal with the source being: =Sum([SunHours] + [MonHours] +
[TueHours] + [WedHours] + [ThuHours] + [FriHours] + [SatHours])
However it reports the same week total result for every record
S M T W T F S WeekTotal
0 2 3 1 2 3 0 11
0 0 1 0 0 0 0 11
--------------------------
0 2 4 1 2 3 0 #error
I also added a grand total where I show #error above. I tried adding all
the sub-totals to the left,
=Sum([SumSunHours] + [SumMonHours] + [SumTueHours] + [SumWedHours] +
[SumThuHours] + [SumFriHours] + [SumSatHours])
and I tried =Sum([WeekTotal]). In both cases not only do I get the
#error, I also get the same #error for all day sub-totals and the week
sub-totals. If I remove the grand total control the other sub-totals show
numbers, but the addition is still wrong for the WeekTotal on subsequnet
lines.

I've done a compact/repair, copied the form, removed the totals and
recreated them, etc.
Why would my subtotals for each week all show the same for different
records, and why won't the grand total work?
Mich
 

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