Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to create expression field in query

Status
Not open for further replies.

Buddha1

Technical User
Feb 5, 2004
32
US
I have a table with the following feilds NAME, COMPANY, CURRENT, MONTH1, MONTH2, MONTH3.
I drug all of these fields down into the query and I want to add an expression field that adds MONTH1 and MONTH2 columns in the last field. In the expression builder I put: = [TblMainData]![MONTH 1] + [TblMainData]![MONTH 2]
However when I run the query nothing shows in the field and I now there are numbers in the table under these columns so it should add these but it doesn't. Can someone please help me???
 
Perhaps Month1 or Month2 can occasionally be null?

Try the Nz function:

= Nz([TblMainData]![MONTH 1]) + Nz([TblMainData]![MONTH 2])

-Gary
 
Yes sometimes the fields that will be added are null. I tried = NZ() but got the same results as before??? Is there any other suggestion???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top