Greetings Gurus,
Perhaps you could help?
I have a Main form "A" with subforms "B" & "C". Both B & C contain time fields which are manually entered in hh:MM:ss format and TotalTime fields with a control source set as Sum([Timefield]).
Main form A contains a Grand TotalTime field which needs to be [SubformB].Form![TotalTime] + [SubformC].Form![TotalTime]. This works fine as long as the TotalTime fields have values but, where one of the fields has no value, A.GrandTotalTime = #Error (as expected).
I have tried setting A.GrandTotalTime = Nz([SubformB].Form![TotalTime]) + Nz([SubformC].Form![TotalTime]) but that makes no difference. I have tried using an event to set if isNull values to 0, "0", "0.00" & 0# but because there is no user interaction with the subforms none of the available events trigger the procedure - all user interaction takes place on the Main form and won't trigger the subforms
How can I get A.GrandTotalTime to accept the 0 value as valid input to the calculation?
Perhaps you could help?
I have a Main form "A" with subforms "B" & "C". Both B & C contain time fields which are manually entered in hh:MM:ss format and TotalTime fields with a control source set as Sum([Timefield]).
Main form A contains a Grand TotalTime field which needs to be [SubformB].Form![TotalTime] + [SubformC].Form![TotalTime]. This works fine as long as the TotalTime fields have values but, where one of the fields has no value, A.GrandTotalTime = #Error (as expected).
I have tried setting A.GrandTotalTime = Nz([SubformB].Form![TotalTime]) + Nz([SubformC].Form![TotalTime]) but that makes no difference. I have tried using an event to set if isNull values to 0, "0", "0.00" & 0# but because there is no user interaction with the subforms none of the available events trigger the procedure - all user interaction takes place on the Main form and won't trigger the subforms
How can I get A.GrandTotalTime to accept the 0 value as valid input to the calculation?