Formula (adding mutiple fields) in query...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple query running off of one table local. Here is my problem:
I am simply trying to total the following fields from the same table with
the same format (Double) for each record but it gives me blanks. No errors
it just won't give me any results.

VideoRepairAnsw: [vid-B&R Korean]+[Vid-HDTV]+[Vid-Rep English]+[Vid-Rep
Spanish]

I've tried many different ways but all my efforts have been in vein. Please
help...Thank you.
 
If any one of the fields is Null, the result will be null.
You can use Nz() to tell Access to substitute zero for null:

VideoRepairAnsw: CDbl(Nz([vid-B&R Korean],0) + Nz([Vid-HDTV],0) +
Nz([Vid-Rep English],0) + Nz([Vid-Rep Spanish],0))
 
Your assistance was greatly appreciated Mr. Browne.

Allen Browne said:
If any one of the fields is Null, the result will be null.
You can use Nz() to tell Access to substitute zero for null:

VideoRepairAnsw: CDbl(Nz([vid-B&R Korean],0) + Nz([Vid-HDTV],0) +
Nz([Vid-Rep English],0) + Nz([Vid-Rep Spanish],0))


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

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

AccessARS said:
I have a simple query running off of one table local. Here is my problem:
I am simply trying to total the following fields from the same table with
the same format (Double) for each record but it gives me blanks. No
errors
it just won't give me any results.

VideoRepairAnsw: [vid-B&R Korean]+[Vid-HDTV]+[Vid-Rep English]+[Vid-Rep
Spanish]

I've tried many different ways but all my efforts have been in vein.
Please
help...Thank you.
 
Back
Top