[AccessD] Nz and Val

Gustav Brock gustav at cactus.dk
Sun Jun 5 03:08:32 CDT 2011


Hi Tony

I know, but know you also know why.

/gustav


>>> iggy at nanaimo.ark.com 04-06-2011 20:48 >>>
Hey Gustav
Thanks kindly again,
As I mentioned in my Emails I think I have got it figured.



Gustav Brock wrote:

>Hi Tony
>
>You didn't mention a combobox. Such one always returns a string, thus your unbound textbox will hold a string as well. If you wish to perform math on the values - you must convert the string to a numeric before doing so. 
>This will do as Nz by default returns a zero length string for Null and Val converts a zero length string to zero (0):
>
>If Me!InvoiceAmount + Val(Nz(Me!TotalInvoice)) > Val(Nz(Me!Budget)) Then
> ..... display Yes/No message
>End If
>
>/gustav





More information about the AccessD mailing list