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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|