A
aznan
Hi!
I'm making a query where an expression calculates a total price of an order.
Total: Sum([Amount]*[Price])
is the expression I'm using, but when I run this it does not list orders
with 0 items (yes, I know, this isn't supposed to happen, but I want it
anyway).
I tried searching through the help file and found that
=OOM(IsNull([Region]),[Stad]&" "& [Postnummer], [Stad]&" "&[Region]&"
"&[Postnummer])
is supposed to list [Stad]&" "&[Region]&" "&[Postnummer] if [Region] has a
value and [Stad]&" "& [Postnummer] if [Region] is null (from the helpfile of
the swedish version).
I used this as a reference and tried with this expression:
=OOM(IsNull ([Amount]),"0",(Sum([Amount]*[Price]))
and hoped that this would replace any null value with "0". But Access
complained that there was an error in the syntax and pointed to the first
comma. I then pasted the original example as the expression, and hoped to
work my way from there, but I got the same syntax error. Strange that the
help file would have syntax errors
Anyway, is there anyone that knows the proper syntax or have a different
solution? Without any sql code, as I'm a complete n00b
Thanks!
I'm making a query where an expression calculates a total price of an order.
Total: Sum([Amount]*[Price])
is the expression I'm using, but when I run this it does not list orders
with 0 items (yes, I know, this isn't supposed to happen, but I want it
anyway).
I tried searching through the help file and found that
=OOM(IsNull([Region]),[Stad]&" "& [Postnummer], [Stad]&" "&[Region]&"
"&[Postnummer])
is supposed to list [Stad]&" "&[Region]&" "&[Postnummer] if [Region] has a
value and [Stad]&" "& [Postnummer] if [Region] is null (from the helpfile of
the swedish version).
I used this as a reference and tried with this expression:
=OOM(IsNull ([Amount]),"0",(Sum([Amount]*[Price]))
and hoped that this would replace any null value with "0". But Access
complained that there was an error in the syntax and pointed to the first
comma. I then pasted the original example as the expression, and hoped to
work my way from there, but I got the same syntax error. Strange that the
help file would have syntax errors
Anyway, is there anyone that knows the proper syntax or have a different
solution? Without any sql code, as I'm a complete n00b
Thanks!