cclark9589
Registered User.
- Local time
- Today, 16:48
- Joined
- Sep 22, 2008
- Messages
- 79
I have two subforms residing on tabs. Each subform has a total for that tab that displays the total hours for that tab. Below the subforms is another control that returns a grand total of the two tabs. One is for billable hours and the other for non-chargeable hours. Whenever new data is entered the totals update fine except for one minor thing.
If I have no hours entered for a particular time period on the non-chargeable tab, the grand total remains blank. I can put a zero in and then the grand total computes. Take it out, it disappears. I've tried using an IIF statement with and without Nz but no go.
Here's the code I currently have in the control source:
=IIf([TC_NChgSubform].[Form]![NCHours]="0",[TC_HrsSubform].[Form]![Total Hours Worked],[TC_HrsSubform].[Form]![Total Hours Worked]+[TC_NChgSubform].[Form]![NCHours])
I've tried different combinations: without the "", "" only, etc. I have a headache again and can't figure this out and haven't found anything pointing the way.
Help for this simpleton would be appreciated.
If I have no hours entered for a particular time period on the non-chargeable tab, the grand total remains blank. I can put a zero in and then the grand total computes. Take it out, it disappears. I've tried using an IIF statement with and without Nz but no go.
Here's the code I currently have in the control source:
=IIf([TC_NChgSubform].[Form]![NCHours]="0",[TC_HrsSubform].[Form]![Total Hours Worked],[TC_HrsSubform].[Form]![Total Hours Worked]+[TC_NChgSubform].[Form]![NCHours])
I've tried different combinations: without the "", "" only, etc. I have a headache again and can't figure this out and haven't found anything pointing the way.
Help for this simpleton would be appreciated.