G
Guest
Hello,
I am using report wizard to build a report from a query. I receive an error
when I have the report wizard sum the gain_loss column of my query. The
syntax for the gain_loss column is below. The error reads, "The expression
is typed incorrectly, or it is too complex to be evaluated. For example, a
numeric expression may contain too many complicated elements. Try
simplifying the expression by assinging parts of the expression to
variables." I can run the query wtihout any error, but I cannot get the
repot wizard to sum the column. There is a nested if statement in my query.
I am not sure what to do. I am very new to Access.
IIf(fxsen.buy_CCY="USD",(IIf(fxsen.sell_ccy="EUR" Or
fxsen.sell_ccy="GBP",(fxsen.settle_rate-fxsen.contract_rate)*fxsen.buy*fxsen.settle_rate,(fxsen.settle_rate-fxsen.contract_rate)*fxsen.buy/fxsen.settle_rate)),(IIf(fxsen.buy_ccy="EUR"
Or
fxsen.buy="GBP",(fxsen.contract_rate-fxsen.settle_rate)*-fxsen.sell*fxsen.settle_rate,(fxsen.contract_rate-fxsen.settle_rate)*-fxsen.sell/fxsen.settle_rate))) AS Gain_Loss
Thanks for your help.
Regards,
John
I am using report wizard to build a report from a query. I receive an error
when I have the report wizard sum the gain_loss column of my query. The
syntax for the gain_loss column is below. The error reads, "The expression
is typed incorrectly, or it is too complex to be evaluated. For example, a
numeric expression may contain too many complicated elements. Try
simplifying the expression by assinging parts of the expression to
variables." I can run the query wtihout any error, but I cannot get the
repot wizard to sum the column. There is a nested if statement in my query.
I am not sure what to do. I am very new to Access.
IIf(fxsen.buy_CCY="USD",(IIf(fxsen.sell_ccy="EUR" Or
fxsen.sell_ccy="GBP",(fxsen.settle_rate-fxsen.contract_rate)*fxsen.buy*fxsen.settle_rate,(fxsen.settle_rate-fxsen.contract_rate)*fxsen.buy/fxsen.settle_rate)),(IIf(fxsen.buy_ccy="EUR"
Or
fxsen.buy="GBP",(fxsen.contract_rate-fxsen.settle_rate)*-fxsen.sell*fxsen.settle_rate,(fxsen.contract_rate-fxsen.settle_rate)*-fxsen.sell/fxsen.settle_rate))) AS Gain_Loss
Thanks for your help.
Regards,
John