Counting records in group not working - Access 2007/WinXP


M

M Skabialka

I have a report where there are multiple lot numbers. I would like my
report to count how many records there are in each lot and show it as a
subtotal.

I created a new control in the detail area, gave the control a name, control
source =1, set running sum to Over Group, and enabled it. When I run the
report it says 1 as the total number of records, and each record shows this
field with a value of 1 on the report, so it isn't incrementing.
If I set running sum to No I still get only 1 for each record and total.
If I change it to Over All it increments on each line but continues counting
into the next group.

I also have a total for the report, using a similar field but it has running
sum set to Over All. It increments on my report once for each record and
gives me a correct result in the footer at the end for a total of all
records in all lot numbers.
I haven't had this problem before with previous versions of Access.

Where am I going wrong here? How do I show the count of records in each lot
number in the lot number footer?
Service Pack 1 is installed.
Mich
 
Ad

Advertisements

K

Ken Sheridan

Mich:

You should be able to do it by putting an unbound text box in the lot number
group footer with a ControlSource property of:

=Count(*)

Ken Sheridan
Stafford, England
 
C

Clifford Bass

Hi Mich,

Forget the running sum thing; get rid of it. Just set you count field
in the group footer and the count field in your report footer to "=Count(*)",
without the quotes. Yes, use the same formula.

Clifford Bass
 
M

M Skabialka

This works well, thanks, but sometimes I don't put =1 as the control source;
I define something e.g: iif([CAL]=true, 1, 0) and add these in a group or
report total. I still need to be able to get the group total so need to
figure out what the glitch is.
 
Ad

Advertisements

C

Clifford Bass

Hi,

In which case just sum that.

=Sum(IIf([CAL], 1, 0))

By the by since CAL is boolean you do not need the =True part.

Clifford Bass

M Skabialka said:
This works well, thanks, but sometimes I don't put =1 as the control source;
I define something e.g: iif([CAL]=true, 1, 0) and add these in a group or
report total. I still need to be able to get the group total so need to
figure out what the glitch is.

Ken Sheridan said:
Mich:

You should be able to do it by putting an unbound text box in the lot
number
group footer with a ControlSource property of:

=Count(*)

Ken Sheridan
Stafford, England
 

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