help with calculated field expression

  • Thread starter Slez via AccessMonster.com
  • Start date
S

Slez via AccessMonster.com

I have a calculated field in a query:
QtySampleLabels: ([QtySolidReqd]+1)+([QtyVeneerReqd]+1)

I don't want it to add 1 if a field has a value of 0.
For example: If QtySolidReqd = 3 and QtyVeneerReqd = 0 ... I'd like it to
add 1 to QtySolidReqd, but not QtyVeneerReqd, which would make
QtySampleLabels = 4 (not 5 as it does with my current expression).

How can my expression be altered to accomplish this?
Thanks in advance for any help!
 
K

KARL DEWEY

Try this --
QtySampleLabels: IIF([QtySolidReqd]=0,[QtySolidReqd],([QtySolidReqd]+1))+
IIF([QtyVeneerReqd]=0,[QtyVeneerReqd],([QtyVeneerReqd]+1))
 

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