If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding the value of two fields when value is null
I am working in a query. I would like to add the value of two fields (OT and
DT) together in a third field. However, sometimes the value of one field is null, and Access won't calculate a total. I don't want to change all of the null values to "0" in the original table (when both fileds have a value, Access doesn't have a problem calculating the total) - Any suggestions? Thank you! |
#2
|
|||
|
|||
Adding the value of two fields when value is null
NZ([OT],0)+NZ([DT],0)
NZ is a function which will return a value if the input is null. "Laura" wrote in message ... I am working in a query. I would like to add the value of two fields (OT and DT) together in a third field. However, sometimes the value of one field is null, and Access won't calculate a total. I don't want to change all of the null values to "0" in the original table (when both fileds have a value, Access doesn't have a problem calculating the total) - Any suggestions? Thank you! |
#3
|
|||
|
|||
Adding the value of two fields when value is null
You can use:
ExtraTime: Nz([OT],0) + Nz([DT],0) IMO, OT, DT, and RG should all create separate records in a related table with a field that store the TimeType. -- Duane Hookom Microsoft Access MVP "Laura" wrote: I am working in a query. I would like to add the value of two fields (OT and DT) together in a third field. However, sometimes the value of one field is null, and Access won't calculate a total. I don't want to change all of the null values to "0" in the original table (when both fileds have a value, Access doesn't have a problem calculating the total) - Any suggestions? Thank you! |
#4
|
|||
|
|||
Adding the value of two fields when value is null
It worked! Thank you SOOOOO much!
"Jellifish" wrote: NZ([OT],0)+NZ([DT],0) NZ is a function which will return a value if the input is null. "Laura" wrote in message ... I am working in a query. I would like to add the value of two fields (OT and DT) together in a third field. However, sometimes the value of one field is null, and Access won't calculate a total. I don't want to change all of the null values to "0" in the original table (when both fileds have a value, Access doesn't have a problem calculating the total) - Any suggestions? Thank you! . |
#5
|
|||
|
|||
Adding the value of two fields when value is null
It worked! Thank you SOOOOO much!
"Duane Hookom" wrote: You can use: ExtraTime: Nz([OT],0) + Nz([DT],0) IMO, OT, DT, and RG should all create separate records in a related table with a field that store the TimeType. -- Duane Hookom Microsoft Access MVP "Laura" wrote: I am working in a query. I would like to add the value of two fields (OT and DT) together in a third field. However, sometimes the value of one field is null, and Access won't calculate a total. I don't want to change all of the null values to "0" in the original table (when both fileds have a value, Access doesn't have a problem calculating the total) - Any suggestions? Thank you! |
Thread Tools | |
Display Modes | |
|
|