Simple Count Function

razorkat99

Still figurin' it out
Local time
Today, 08:59
Joined
Oct 22, 2007
Messages
35
I have read the many posts here regarding creating a simple COUNT function and am still unable to get my calculation to work. I have check boxes in my report that I am trying to count if selected. The calculation is in the footer.

I have read in the forum and tried to use the following as well as many other options, but to no avail:
=Count(IIf([DSL_In],1,0))
=Sum([DSL_In])
=Count(IIf([DSL_In],"YES",1,0))

Any help would be appreciated. I have created many tables and reports in Access, but I have never been successful with calculations. Unfortunately, I have several other calculations to do in addition to this one.
 
=Sum(IIf([DSL_In] = True,1,0))
 
Thanks Paul, but it still didn't work. I am at a loss.

Checkbox Control Source: POTS/DSL In
Control Source for the footer: =Sum(IIf([POTS/DSL In]=True,1,0))

The data is there in the report, so why would I keep getting an error for the total?
 
Make sure there is not a control with the same name as the field, which can confuse Access.
 
Sorry, I don't understand what you mean.

Unfortunately, since the company isn't supplying an Access book I have to wait until Wed or later for one to transfer in to the library. I'm just a temp who got asked to help out with this project 'cause no one else knows how to create what they want either.
 
Each control has a name and generally a control source. The control source is the name of the field in the data. If the name of the control is the same, Access can get confused about which you want and it will simply error. Can you post the db if it doesn't contain anything confidential?
 
OK, I see what you mean, but I don't see that I have that problem. I tried uploading the db, but the zip file exceeds the limitation at 614kb.
 
Make sure you do a compact/repair before zipping, as that will often bring it down enough.
 
Ok, I see what you mean, but I don't see that I have that problem. Here is the db. It's only in the beginning stages, so it is very simple. I believe I'm going to be shopping tonight for a new book!
 

Attachments

Sorry, I had a brain cramp and forgot. You need to move that to the report footer instead of the page footer.
 
OMG! Thanks a million! Now, on to the more difficult tasks and getting my report to do what I want.
 
No problem; post again if you get stuck.
 

Users who are viewing this thread

Back
Top Bottom