null error

  • Thread starter Thread starter cjgav
  • Start date Start date
C

cjgav

I have created a db for a service centrei based on northwind my invoices
sometimes only have a labour fee and no parts (products) are used this
expression in the query creates a null error in my invoice report ,
ExtendedPrice: CCur([Products].[UnitPrice]
*[Quantity]*(1-[Discount])/100)*100

Any idea how I could prevent this
 
CCur() doesn't cope with null.

ExtendedPrice: CCur(Nz([Products].[UnitPrice] * [Quantity] * (1 -
[Discount]) /100, 0)) * 100
 
Thanks thats solved that works a treat

Allen Browne said:
CCur() doesn't cope with null.

ExtendedPrice: CCur(Nz([Products].[UnitPrice] * [Quantity] * (1 -
[Discount]) /100, 0)) * 100

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

cjgav said:
I have created a db for a service centrei based on northwind my invoices
sometimes only have a labour fee and no parts (products) are used this
expression in the query creates a null error in my invoice report ,
ExtendedPrice: CCur([Products].[UnitPrice]
*[Quantity]*(1-[Discount])/100)*100

Any idea how I could prevent this
 
Back
Top