Expression when one portion may have no data

B

bizee

I finally got my query to show all contracts, not just those with
actual costs. I have columns

Contractid
Authorized value
cost to date
uncosted (expression) Authorized - cost to date. There has only
been one month in the fiscal year, so some contracts have no cost.

In that case, cost to date is blank AND uncosted is blank. I'd like
uncosted to be the value. in other words to have the blank data
return a ZERO, then the expression would give me a value for Uncosted.

I did an iff statement, when I did this, ONLY the items with costs
showed up in the query, those with no value didn't gain a 0

=IIF([cost] Is null,0,[cost]) this is what I tried.

thanks
 
T

tkelley via AccessMonster.com

Try:

=IIF(IsNull([cost]), 0,[cost])

I finally got my query to show all contracts, not just those with
actual costs. I have columns

Contractid
Authorized value
cost to date
uncosted (expression) Authorized - cost to date. There has only
been one month in the fiscal year, so some contracts have no cost.

In that case, cost to date is blank AND uncosted is blank. I'd like
uncosted to be the value. in other words to have the blank data
return a ZERO, then the expression would give me a value for Uncosted.

I did an iff statement, when I did this, ONLY the items with costs
showed up in the query, those with no value didn't gain a 0

=IIF([cost] Is null,0,[cost]) this is what I tried.

thanks
 

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