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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

does this make sense 3
Extended Price: 3
Surpress #ERROR 3
Report totals off by a couple cents. 4
percentage calculation...trying again 26
percentage calculation 2
Make table query 1
Sum problem 1

Back
Top