substracting in query

  • Thread starter peljo via AccessMonster.com
  • Start date
P

peljo via AccessMonster.com

I have a calculated field in my query where one sum is substracted from
another.However when there is nothing in the second field, the result is
also nothing, while i want to preserve the first value
my expression in the query is : Diff: [imported]-[exported]

if i have 100 items imported and nothing exported, the result is nothing,
while i want to be 100
How could i achieve that ?
 
S

Stefan Hoffmann

hi,
I have a calculated field in my query where one sum is substracted from
another.However when there is nothing in the second field, the result is
also nothing, while i want to preserve the first value
my expression in the query is : Diff: [imported]-[exported]
Use the Nz() function:

Diff: Nz([imported],0) - Nz([exported],0)



mfG
--> stefan <--
 

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