R
Rodi
Hi all,
On a form, I have a control that is populated by the expression:
DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID)
Which is great, unless I encounter a null value for SCallID. When that
happens when I open the form, I get #error displayed on the control, as well
I should. My difficulty is in circumventing that error.
I tried using Nz(DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID))
but it doesn't appear D functions like the Nz() function, unless I applied
it wrong.
I also tried:
=iif(isnull(DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID)),0,(DSum("[priceper]*[partquantity]","Parts","serviceID = " & [Forms]![servicecall]!SCallID)))
But, that didn't give me the 0 that i wanted if the DSum() returned a null
like I wanted.
Can anybody tell me what I did wrong?
Thanks in advance
R
On a form, I have a control that is populated by the expression:
DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID)
Which is great, unless I encounter a null value for SCallID. When that
happens when I open the form, I get #error displayed on the control, as well
I should. My difficulty is in circumventing that error.
I tried using Nz(DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID))
but it doesn't appear D functions like the Nz() function, unless I applied
it wrong.
I also tried:
=iif(isnull(DSum("[priceper]*[partquantity]","Parts","serviceID = " &
[Forms]![servicecall]!SCallID)),0,(DSum("[priceper]*[partquantity]","Parts","serviceID = " & [Forms]![servicecall]!SCallID)))
But, that didn't give me the 0 that i wanted if the DSum() returned a null
like I wanted.
Can anybody tell me what I did wrong?
Thanks in advance
R