Nulls In data

  • Thread starter Laura1 via AccessMonster.com
  • Start date
L

Laura1 via AccessMonster.com

I am trying to divide two fields however some have nulls. I am appending the
results into table and I get a type conversation error the data flows it just
looks messy.

Need an iif statement I think.

Here it is:

SEV/Compbalance give desired result however there is a null in the SEV, if
SEV is null then I want to take M_O_M Value and populate the calculated field.


Any help would be great!!!

Thanks,

Laura
 
A

Allen Browne

Try something like this (one one line):
IIf([SEV] Is Not Null AND [Compbalance] <> 0,
[SEV] / [Compbalance], [M_O_M])

This will avoid the divide-by-zero error if Compbalance is zero, and will
populate with M_O_M if either field is null.
 

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

Top