Re: #Num!
- From: "Claudette Hennessy" <chennessy@xxxxxxxxxxx>
- Date: Fri, 27 May 2005 20:55:12 -0400
This works! after I changed the textbox names to txtAmount and txtUnitPrice.
thank you very much. Seeing #Num! in a calculated field for new records has
bugged me for a long time.
Claudette Hennessy
"Wayne Morgan" <comprev_gothroughthenewsgroup@xxxxxxxxxxx> wrote in message
news:euE4eMjYFHA.3840@xxxxxxxxxxxxxxxxxxxxxxx
> =Nz(IIf([UnitPrice]=0, 0, [Amount]/[UnitPrice]), 0)
>
> You can't divide by 0 without getting an error, but with either value
> Null, the result will be Null. The IIf solves the divide by zero problem,
> then the Nz handles the Null result.
>
> --
> Wayne Morgan
> MS Access MVP
>
>
> "Claudette Hennessy" <chennessy@xxxxxxxxxxx> wrote in message
> news:eJwUo6iYFHA.3364@xxxxxxxxxxxxxxxxxxxxxxx
>> For instance, a calculated field is set to [Amount]/[UnitPrice]. This
>> results in #Num! on some records. Am looking for an expression that
>> results in 0 if either [Amount] or [Unit Price] is null.
>> Claudette Hennessy
>>
>
>
.
- Prev by Date: Re: Very Simple Iif Question
- Next by Date: Re: Using Combo boxes
- Previous by thread: Re: #Num!
- Next by thread: Filter a form
- Index(es):
Relevant Pages
|