Heeeelp, my Nz function won't work as I expected with enormous consequences for all my work!
I have a field on a report called txtPrice. THen in my report code I have the following
If Nz(Me!txtPrice,0) > 0 then
msgbox "hello
End If
0 is not greater than 0, so I was not expecting a msg to appear, but it does.
Surely if Me!txtPrice is empty, and I use Nz, specifying that it return a zero, the stetment should evaluate properly? If I evaluate whether it's less than zero it works fine.
The only way round I can see is to say the following:
If Nz(Me!txtPrice)<> "" AND Nz(Me!txtPrice) > 0 then....
but this defeats the whole point of having the Nz function.
Any ideas would be gratefullt appreciated as I'm tearing my hair out.
I have a field on a report called txtPrice. THen in my report code I have the following
If Nz(Me!txtPrice,0) > 0 then
msgbox "hello
End If
0 is not greater than 0, so I was not expecting a msg to appear, but it does.
Surely if Me!txtPrice is empty, and I use Nz, specifying that it return a zero, the stetment should evaluate properly? If I evaluate whether it's less than zero it works fine.
The only way round I can see is to say the following:
If Nz(Me!txtPrice)<> "" AND Nz(Me!txtPrice) > 0 then....
but this defeats the whole point of having the Nz function.
Any ideas would be gratefullt appreciated as I'm tearing my hair out.