column manipulation

M

Mano

How do I add columns in a query?
I need to add four columns, only when all the four columns contain numbers i
get the output else it is blank. Since all the columns are derived from
different queries i am not able to give a default value as zero. Kindly help
me
 
J

John W. Vinson

How do I add columns in a query?
I need to add four columns, only when all the four columns contain numbers i
get the output else it is blank. Since all the columns are derived from
different queries i am not able to give a default value as zero. Kindly help
me

Use the NZ() function to convert Null to Zero. If your query contains number
fields A, B, C and D, any of which may be NULL, you can put

Total: NZ([A]) + NZ() + NZ([C]) + NZ([D])

in a vacant Field cell in your query to add up all four fields, treating
blanks as if they were zeros.
 
M

Mano

hi John
Thank you. You solved my issue in no time.
Thank u once again.

John W. Vinson said:
How do I add columns in a query?
I need to add four columns, only when all the four columns contain numbers i
get the output else it is blank. Since all the columns are derived from
different queries i am not able to give a default value as zero. Kindly help
me

Use the NZ() function to convert Null to Zero. If your query contains number
fields A, B, C and D, any of which may be NULL, you can put

Total: NZ([A]) + NZ() + NZ([C]) + NZ([D])

in a vacant Field cell in your query to add up all four fields, treating
blanks as if they were zeros.
 
Top