A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count or total a logocal field



 
 
Thread Tools Display Modes
  #1  
Old July 24th, 2007, 07:22 PM posted to microsoft.public.access.reports
JR Hester
external usenet poster
 
Posts: 375
Default Count or total a logocal field

Using Access 2k and XP, in Windows 2k and XP respectively

I am struggling with generating a total count of two fields in a report
footer. Both fields are "yes/No" type. I want to count the number of reported
entries that have the TrxCompleted field checked(TRUE).

I have set a text box in the footer and defined the source property using
the following formula =Count([TrxCompleted]=True). I have tried various
modifications to this, however results are either #error or -1.

What am I missing here??

Thanks in advance for your ideas and pointers.
  #2  
Old July 24th, 2007, 08:39 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Count or total a logocal field

JR Hester wrote:

Using Access 2k and XP, in Windows 2k and XP respectively

I am struggling with generating a total count of two fields in a report
footer. Both fields are "yes/No" type. I want to count the number of reported
entries that have the TrxCompleted field checked(TRUE).

I have set a text box in the footer and defined the source property using
the following formula =Count([TrxCompleted]=True). I have tried various
modifications to this, however results are either #error or -1.

What am I missing here??



You're missing the fact that Count counts all non-Null
values. Try using:

=-Sum(TrxCompleted)

Note the minus sign.

This works because True is -1 and False is 0.

--
Marsh
MVP [MS Access]
  #3  
Old July 25th, 2007, 04:28 PM posted to microsoft.public.access.reports
JR Hester
external usenet poster
 
Posts: 375
Default Count or total a logocal field

Thanks for your reply. UNfortunately, the =-Sum(TrxCompleted) still returns a
#Error message. Other suggestions!

"Marshall Barton" wrote:

JR Hester wrote:

Using Access 2k and XP, in Windows 2k and XP respectively

I am struggling with generating a total count of two fields in a report
footer. Both fields are "yes/No" type. I want to count the number of reported
entries that have the TrxCompleted field checked(TRUE).

I have set a text box in the footer and defined the source property using
the following formula =Count([TrxCompleted]=True). I have tried various
modifications to this, however results are either #error or -1.

What am I missing here??



You're missing the fact that Count counts all non-Null
values. Try using:

=-Sum(TrxCompleted)

Note the minus sign.

This works because True is -1 and False is 0.

--
Marsh
MVP [MS Access]

  #4  
Old July 25th, 2007, 07:28 PM posted to microsoft.public.access.reports
JR Hester
external usenet poster
 
Posts: 375
Default Count or total a logocal field

Is there any report or Access options that might disable the "Sum" function?
I added a purely numeric field to my report, then addeda total field to teh
page footer. entered =Sum(credit) as the control source. This returned a
numeric result one time only, after that first report, this control and my
original controls simply return a "#error". Suggestions?

"Marshall Barton" wrote:

JR Hester wrote:

Using Access 2k and XP, in Windows 2k and XP respectively

I am struggling with generating a total count of two fields in a report
footer. Both fields are "yes/No" type. I want to count the number of reported
entries that have the TrxCompleted field checked(TRUE).

I have set a text box in the footer and defined the source property using
the following formula =Count([TrxCompleted]=True). I have tried various
modifications to this, however results are either #error or -1.

What am I missing here??



You're missing the fact that Count counts all non-Null
values. Try using:

=-Sum(TrxCompleted)

Note the minus sign.

This works because True is -1 and False is 0.

--
Marsh
MVP [MS Access]

  #5  
Old July 25th, 2007, 08:10 PM posted to microsoft.public.access.reports
JR Hester
external usenet poster
 
Posts: 375
Default Count or total a logocal field

Do I ever feel foolish! All that time I had placed my formulas in the PAGE
footer. As soon as I moved them to the REPORT footer they work just like they
are supposed to. Bet I don't make that mistake again anytime soon!

Thanks Marshall, for your pointers!



"JR Hester" wrote:

Using Access 2k and XP, in Windows 2k and XP respectively

I am struggling with generating a total count of two fields in a report
footer. Both fields are "yes/No" type. I want to count the number of reported
entries that have the TrxCompleted field checked(TRUE).

I have set a text box in the footer and defined the source property using
the following formula =Count([TrxCompleted]=True). I have tried various
modifications to this, however results are either #error or -1.

What am I missing here??

Thanks in advance for your ideas and pointers.

  #6  
Old July 25th, 2007, 10:29 PM posted to microsoft.public.access.reports
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Count or total a logocal field

JR Hester wrote:

Do I ever feel foolish! All that time I had placed my formulas in the PAGE
footer. As soon as I moved them to the REPORT footer they work just like they
are supposed to. Bet I don't make that mistake again anytime soon!

Thanks Marshall, for your pointers!


I (and most everyone) can relate to that feeling ;-)

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.