Summing in Footer

G

Guest

Hello,

I have the following Footers and Fields, which I need to sum on. I saw a
OVER GROUP comment made in other posts, but that does not seem to work:

WEEK FOOTER:

Field: txtSumHrs:
=IIf(Sum([HoursWork])>40,40,Format(Sum([HoursWork]),"Standard"))
Field: txtSumHrs1: =txtSumHrs (Running Sum Over Group)

NAME FOOTER:

Field: =txt72: ([txtSumHrs1]) - This is my problem. It does not sum across
2 or more weeks, rather, just gives me the last week data.

What am I missing?
 
G

Guest

I don't think you have a good understanding. First, don't format values that
you want to do math with. Use the format property to set display formats.

I expect what you refer to as "Fields" are actually controls. Try set the
control txtSumHrs1 to:
Control Source: =IIf(Sum([HoursWork])>40,40,Sum([HoursWork]))
Running Sum: Over Group

Then set the text box in the [Name] footer:
Control Source: =txtSumHrs1
 
G

Guest

That worked well. Thanks.
--
David


Duane Hookom said:
I don't think you have a good understanding. First, don't format values that
you want to do math with. Use the format property to set display formats.

I expect what you refer to as "Fields" are actually controls. Try set the
control txtSumHrs1 to:
Control Source: =IIf(Sum([HoursWork])>40,40,Sum([HoursWork]))
Running Sum: Over Group

Then set the text box in the [Name] footer:
Control Source: =txtSumHrs1


--
Duane Hookom
Microsoft Access MVP


David said:
Hello,

I have the following Footers and Fields, which I need to sum on. I saw a
OVER GROUP comment made in other posts, but that does not seem to work:

WEEK FOOTER:

Field: txtSumHrs:
=IIf(Sum([HoursWork])>40,40,Format(Sum([HoursWork]),"Standard"))
Field: txtSumHrs1: =txtSumHrs (Running Sum Over Group)

NAME FOOTER:

Field: =txt72: ([txtSumHrs1]) - This is my problem. It does not sum across
2 or more weeks, rather, just gives me the last week data.

What am I missing?
 

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