View Full Version : Query multiplication of null fields


Hudson40
11-06-2008, 07:18 AM
Hi

I have a query resulting from several other querys. There is a potential problem in that I am multipling 3 query fields together. If there is data in each field then the query produces the desired result. If however one of the fields is blank/null the calculation of the other 2 fields does not happen and the desired result is blank/null. Does anybody know how I can get around this?

Thanks

Andrew

neileg
11-06-2008, 08:00 AM
You could use Nz() to convert the nulls to 1. Then if you have a null you will get the product of the other two fields. Trouble is, if all your fields are null you'll get a value of 1. Does that matter?

Hudson40
11-07-2008, 01:14 AM
Thanks Neil...no the fields will never all be blank - just one at the most.

Thanks for that. I will give it a go.