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
|
|||
|
|||
sum
On a report, in a text box, I'm trying to count the True results..
TR_EXPEDITED is a check box on the form, so the query shows "0" or "1" obviously. But when I code the text box in the report to count them with either "0"/"1" or "True/False" I get an error "mismatch in criteria expression".. =Sum(Abs([TR_Expedited]='True')) Suggestions???? |
#2
|
|||
|
|||
sum
Try removing the quotes from around the word True. The same thing would
apply to 0 or -1. "Dan @BCBS" wrote in message ... On a report, in a text box, I'm trying to count the True results.. TR_EXPEDITED is a check box on the form, so the query shows "0" or "1" obviously. But when I code the text box in the report to count them with either "0"/"1" or "True/False" I get an error "mismatch in criteria expression".. =Sum(Abs([TR_Expedited]='True')) Suggestions???? |
#3
|
|||
|
|||
sum
First, the value of VBA constant True is -1. False is 0
They are a boolean data type, so only -1 and 0 are allowed. Second, you would not put the True or False in quotes. That turns it into a string value, so you are trying to compare a numeric data type to a string data type. All you need is: =Sum(Abs([TR_Expedited])) -- Dave Hargis, Microsoft Access MVP "Dan @BCBS" wrote: On a report, in a text box, I'm trying to count the True results.. TR_EXPEDITED is a check box on the form, so the query shows "0" or "1" obviously. But when I code the text box in the report to count them with either "0"/"1" or "True/False" I get an error "mismatch in criteria expression".. =Sum(Abs([TR_Expedited]='True')) Suggestions???? |
Thread Tools | |
Display Modes | |
|
|