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
|
|||
|
|||
Calculated field for option group
Would anyone mind taking a guess at what might be missing from this
expression for a calculated field in my query (for the first part of my option group in an unbound form)? PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0) Thank you! |
#2
|
|||
|
|||
Calculated field for option group
Missing ) for an expression started by SUM,
Missing a coma and the third argument of the first iif, Missing ) for the first iif. PrevQtr: IIF( [Forms]![FrmTest]![ Frame0] = 1, SUM( IIF( Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0 ) Vanderghast, Access MVP "AccessKay" wrote in message ... Would anyone mind taking a guess at what might be missing from this expression for a calculated field in my query (for the first part of my option group in an unbound form)? PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0) Thank you! |
#3
|
|||
|
|||
Calculated field for option group
Thanks for finding this. I'm lousy at writing these. I tried to follow and
now I have too many arguments. PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0),0) "vanderghast" wrote: Missing ) for an expression started by SUM, Missing a coma and the third argument of the first iif, Missing ) for the first iif. PrevQtr: IIF( [Forms]![FrmTest]![ Frame0] = 1, SUM( IIF( Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0 ) Vanderghast, Access MVP "AccessKay" wrote in message ... Would anyone mind taking a guess at what might be missing from this expression for a calculated field in my query (for the first part of my option group in an unbound form)? PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0) Thank you! |
#4
|
|||
|
|||
Calculated field for option group
SUM takes only one argument, not 2 as typed, actually, you have SUM( iif( ,
, ), 0 ) PrevQtr: IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum( IIF( Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0 ) , 0 ) You still have an unbalanced number of parentheses: 8 ( for 6 ). Vanderghast, Access MVP "AccessKay" wrote in message ... Thanks for finding this. I'm lousy at writing these. I tried to follow and now I have too many arguments. PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0),0) |
#5
|
|||
|
|||
Calculated field for option group
I think I got it...
PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0))),0) Though, I'm not sure it's what I want...back to making a new one. Thanks for your assistance. I would have had to stop trying without your help. "vanderghast" wrote: SUM takes only one argument, not 2 as typed, actually, you have SUM( iif( , , ), 0 ) PrevQtr: IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum( IIF( Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0 ) , 0 ) You still have an unbalanced number of parentheses: 8 ( for 6 ). Vanderghast, Access MVP "AccessKay" wrote in message ... Thanks for finding this. I'm lousy at writing these. I tried to follow and now I have too many arguments. PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0),0) |
#6
|
|||
|
|||
Calculated field for option group
What about the leading space in [ Frame0] ?
-- Build a little, test a little. "AccessKay" wrote: I think I got it... PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0))),0) Though, I'm not sure it's what I want...back to making a new one. Thanks for your assistance. I would have had to stop trying without your help. "vanderghast" wrote: SUM takes only one argument, not 2 as typed, actually, you have SUM( iif( , , ), 0 ) PrevQtr: IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum( IIF( Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0 ) , 0 ) You still have an unbalanced number of parentheses: 8 ( for 6 ). Vanderghast, Access MVP "AccessKay" wrote in message ... Thanks for finding this. I'm lousy at writing these. I tried to follow and now I have too many arguments. PrevQtr:IIF([Forms]![FrmTest]![ Frame0] = 1, (Sum(IIF(Format([TransDate], "yyyyq") = Format(DateAdd("q", -1,Date()), "yyyyq"), [ODC_Cost], 0),0) |
Thread Tools | |
Display Modes | |
|
|