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
|
|||
|
|||
SumIf Help
Hi, I want to do something like this:
If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
#2
|
|||
|
|||
SumIf Help
Try use:
=Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs]) -- Duane Hookom Microsoft Access MVP "Karin" wrote: Hi, I want to do something like this: If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
#3
|
|||
|
|||
SumIf Help
Duane,
Thank you. After several hours, this is what I came up with. I don't really understand why I need to use the Abs reference. I thought Abs was just to get a positive number (even if the answer was a negative). =Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs])) "Duane Hookom" wrote: Try use: =Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs]) -- Duane Hookom Microsoft Access MVP "Karin" wrote: Hi, I want to do something like this: If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
#4
|
|||
|
|||
SumIf Help
I forgot to mention that your response works great and its a little cleaner.
"Karin" wrote: Duane, Thank you. After several hours, this is what I came up with. I don't really understand why I need to use the Abs reference. I thought Abs was just to get a positive number (even if the answer was a negative). =Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs])) "Duane Hookom" wrote: Try use: =Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs]) -- Duane Hookom Microsoft Access MVP "Karin" wrote: Hi, I want to do something like this: If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
#5
|
|||
|
|||
SumIf Help
Why I use Abs():
This expression will return either 0 (False) or -1 (True). ([ProjectFYE] Between #01/01/2006# And #12/31/2006#) Abs() will convert the -1 to 1. -- Duane Hookom Microsoft Access MVP "Karin" wrote: I forgot to mention that your response works great and its a little cleaner. "Karin" wrote: Duane, Thank you. After several hours, this is what I came up with. I don't really understand why I need to use the Abs reference. I thought Abs was just to get a positive number (even if the answer was a negative). =Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs])) "Duane Hookom" wrote: Try use: =Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs]) -- Duane Hookom Microsoft Access MVP "Karin" wrote: Hi, I want to do something like this: If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
#6
|
|||
|
|||
SumIf Help
The "Ah ha" moment. Thank you!
"Duane Hookom" wrote: Why I use Abs(): This expression will return either 0 (False) or -1 (True). ([ProjectFYE] Between #01/01/2006# And #12/31/2006#) Abs() will convert the -1 to 1. -- Duane Hookom Microsoft Access MVP "Karin" wrote: I forgot to mention that your response works great and its a little cleaner. "Karin" wrote: Duane, Thank you. After several hours, this is what I came up with. I don't really understand why I need to use the Abs reference. I thought Abs was just to get a positive number (even if the answer was a negative). =Abs(Sum(([ProjectFYE] Between #01/01/2006# And #12/31/2006#)*[BudgetHrs])) "Duane Hookom" wrote: Try use: =Sum(Abs([ProjectFYE] between #1/1/2006# and #12/31/2006#) *[BudgetHrs]) -- Duane Hookom Microsoft Access MVP "Karin" wrote: Hi, I want to do something like this: If [ProjectFYE] between #1/1/2006# and #12/31/2006# Sum [BudgetHrs]. I want to do this in a report group footer. TIA |
Thread Tools | |
Display Modes | |
|
|