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
|
|||
|
|||
Absolute value of a checkbox in a query
Using Access 2000
I have a query based on a table with a bunch of check boxes. I want to sum the checkboxes based on a field then transfer that to an Excel sheet. However, Access uses a -1 for a "yes" value instead of a 1. I know I can sum on the absolute value of each field, but that requires me to modify each field in the query. Is there a simpler way to do this? On an aside, what is the reason Microsoft chose to use this instead of plain ol' 1? Thanks, -Mark |
#2
|
|||
|
|||
Absolute value of a checkbox in a query
try
Sum(IIf([CheckboxName] = 0, 0, 1)) no answer for the second question, i'm afraid. hth "MarkD" wrote in message ... Using Access 2000 I have a query based on a table with a bunch of check boxes. I want to sum the checkboxes based on a field then transfer that to an Excel sheet. However, Access uses a -1 for a "yes" value instead of a 1. I know I can sum on the absolute value of each field, but that requires me to modify each field in the query. Is there a simpler way to do this? On an aside, what is the reason Microsoft chose to use this instead of plain ol' 1? Thanks, -Mark |
#3
|
|||
|
|||
Absolute value of a checkbox in a query
Thanks Tina...
Yeah, I know I can do that (or variants thereof), but I don't want to change each of the 30 checkbox fields. I was hoping there'd be a global way to change things. I'm just lazy, I guess. -Mark -----Original Message----- try Sum(IIf([CheckboxName] = 0, 0, 1)) no answer for the second question, i'm afraid. hth "MarkD" wrote in message ... Using Access 2000 I have a query based on a table with a bunch of check boxes. I want to sum the checkboxes based on a field then transfer that to an Excel sheet. However, Access uses a -1 for a "yes" value instead of a 1. I know I can sum on the absolute value of each field, but that requires me to modify each field in the query. Is there a simpler way to do this? On an aside, what is the reason Microsoft chose to use this instead of plain ol' 1? Thanks, -Mark . |
#4
|
|||
|
|||
MORE HELP, ANYBODY? Absolute value of a checkbox in a query
well, i can't think of anything that wouldn't require you to enumerate the
fields in some fashion - even if you use a public function, you'd still have to substitute the function call for each field in your query. there may be a more elegant way, but it's beyond me. maybe somebody else will post a solution, and we'll both learn something. "MarkD" wrote in message ... Thanks Tina... Yeah, I know I can do that (or variants thereof), but I don't want to change each of the 30 checkbox fields. I was hoping there'd be a global way to change things. I'm just lazy, I guess. -Mark -----Original Message----- try Sum(IIf([CheckboxName] = 0, 0, 1)) no answer for the second question, i'm afraid. hth "MarkD" wrote in message ... Using Access 2000 I have a query based on a table with a bunch of check boxes. I want to sum the checkboxes based on a field then transfer that to an Excel sheet. However, Access uses a -1 for a "yes" value instead of a 1. I know I can sum on the absolute value of each field, but that requires me to modify each field in the query. Is there a simpler way to do this? On an aside, what is the reason Microsoft chose to use this instead of plain ol' 1? Thanks, -Mark . |
#5
|
|||
|
|||
MORE HELP, ANYBODY? Absolute value of a checkbox in a query
Thanks again Tina,
Hopefully there is a quick-n-ditry solution, but it looks like I gotta change all fields manually. And I so wanted my Friday before Memorial Day to be a lazy day at work! -Mark -----Original Message----- well, i can't think of anything that wouldn't require you to enumerate the fields in some fashion - even if you use a public function, you'd still have to substitute the function call for each field in your query. there may be a more elegant way, but it's beyond me. maybe somebody else will post a solution, and we'll both learn something. "MarkD" wrote in message ... Thanks Tina... Yeah, I know I can do that (or variants thereof), but I don't want to change each of the 30 checkbox fields. I was hoping there'd be a global way to change things. I'm just lazy, I guess. -Mark -----Original Message----- try Sum(IIf([CheckboxName] = 0, 0, 1)) no answer for the second question, i'm afraid. hth "MarkD" wrote in message ... Using Access 2000 I have a query based on a table with a bunch of check boxes. I want to sum the checkboxes based on a field then transfer that to an Excel sheet. However, Access uses a -1 for a "yes" value instead of a 1. I know I can sum on the absolute value of each field, but that requires me to modify each field in the query. Is there a simpler way to do this? On an aside, what is the reason Microsoft chose to use this instead of plain ol' 1? Thanks, -Mark . . |
Thread Tools | |
Display Modes | |
|
|