[AccessD] Nz and Val

Tony Septav iggy at nanaimo.ark.com
Fri Jun 3 12:26:44 CDT 2011


Hey Gustav
Thanks kindly
Tried your suggestion.

Got the values to come out to1000>900

But the if statement doesn't fire, time to do some more testing.
In fooling around with this yesterday I even at one point got the error 
message
"Wrong number of arguments or invalid property statement"

Thanks again.

Gustav Brock wrote:

>Hi Tony
>
>Let Nz return a numeric:
>
>If Me!InvoiceAmount + Nz(Me!TotalInvoice, 0) > Nz(Me!Budget, 0) Then
> ..... display Yes/No message
>End If
>
>/gustav
>
>
>  
>
>>>>iggy at nanaimo.ark.com 03-06-2011 18:23 >>>
>>>>        
>>>>
>Hey All
>I have four controls on a form.
>JobCode - a combo box
>Budget -an unbound text box control source = 
>format(me!JobCode.column(2),"#.###")
>TotalInvoices - an unbound text box control source = 
>format(me!JobCode.column(4),"#.###.00")
>InvoiceAmount - a bound text box
>What I am doing (On BeforeUpdate) is letting the user know if the 
>current invoice amount + the total invoice amount may exceed the budget.
>Just curious, can someone explain to me why this doesn't work
>me!InvoiceAmount=$200
>me!TotalInvoice=$800
>me!Budget=$900
>If me!InvoiceAmount + nz(me!TotalInvoice)> nz(me!Budget) then
> ..... display Yes/No message
>endif
>When I check, the values come out to 200>900
>But this does work
>If me!InvoiceAmount + val(nz(me!JobCode.column(4))> nz(me!Budget) then
> ..... display Yes/No message
>endif
>When I check, the values come out to1000>900
>
>
>  
>




More information about the AccessD mailing list