![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? |
#3
| |||
| |||
|
|
buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. |
#4
| |||
| |||
|
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:X6GdnTxvurtB3tbQnZ2dnUVZ_sadnZ2d (AT) earthlink (DOT) com... buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. Oooh, that's clever. Thanks. It'd be a pita writing the expression for 17 fields. |
#5
| |||
| |||
|
|
buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:X6GdnTxvurtB3tbQnZ2dnUVZ_sadnZ2d (AT) earthlink (DOT) com... buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. Oooh, that's clever. Thanks. It'd be a pita writing the expression for 17 fields. ![]() You're welcome. |
#6
| |||
| |||
|
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:nbydnToSZ7ko9NbQnZ2dnUVZ_vidnZ2d (AT) earthlink (DOT) com... buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:X6GdnTxvurtB3tbQnZ2dnUVZ_sadnZ2d (AT) earthlink (DOT) com... buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. Oooh, that's clever. Thanks. It'd be a pita writing the expression for 17 fields. ![]() You're welcome. Indeed! Just got it working. Super sweet. |
#7
| |||
| |||
|
|
buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:nbydnToSZ7ko9NbQnZ2dnUVZ_vidnZ2d (AT) earthlink (DOT) com... buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:X6GdnTxvurtB3tbQnZ2dnUVZ_sadnZ2d (AT) earthlink (DOT) com... buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. Oooh, that's clever. Thanks. It'd be a pita writing the expression for 17 fields. ![]() You're welcome. Indeed! Just got it working. Super sweet. Uhhhh...potential problem. If there are negative numbers there is a possibility that adding up numbers could equal zero. Adding Abs() around each field in the expression would solve that if negatives are possible. Or a humoungous criteria statement with ORs would work as well. |
#8
| |||
| |||
|
|
"Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news 4WdncbrB5wx5tbQnZ2dnUVZ_oidnZ2d (AT) earthlink (DOT) com...buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:nbydnToSZ7ko9NbQnZ2dnUVZ_vidnZ2d (AT) earthlink (DOT) com... buckskin wrote: "Salad" <salad (AT) oilandvinegar (DOT) com> wrote in message news:X6GdnTxvurtB3tbQnZ2dnUVZ_sadnZ2d (AT) earthlink (DOT) com... buckskin wrote: I've got a simple select query as the basis of a report with multiple currency fields and a few text fields. If all of the currency fields are zero I would like to exclude them from the report. There are 17 currency fields. How can I amend the query to exclude those empty rows? Well, you could have a calced field in your query. Ex: TotCur : [Field1] + [Field2] + [Field3].... And in the criteria have 0 I think that should work. * Oooh, that's clever. Thanks. It'd be a pita writing the expression for 17 fields. ![]() You're welcome. Indeed! Just got it working. Super sweet. Uhhhh...potential problem. If there are negative numbers there is a possibility that adding up numbers could equal zero. Adding Abs() around each field in the expression would solve that if negatives are possible. Or a humoungous criteria statement with ORs would work as well. Yes negatives can and will happen. I don't know what Abs() is but will lookup. Abs makes a number positive whether or not the number is positive or |
|
I was playing with criteria but at some point you can't go to the next field - did I run out of them? i.e there's a limit to the criteria you can specify in Access 2000? |
![]() |
| Thread Tools | |
| Display Modes | |
| |