I am running into a problem returning a 0 when there are no subform records. I usually use a hidden total text box at the bottom of the subform, and just pull this to the main form. When there are no records I get an Error#.
I have tried to use..
=Nz(Sum([Log]))
=IIF(IsNull(Sum([Log]),0,Sum([Log])
....Sum([Log]) is null,...
All which did not work, I finally had to write a function on the main form that when it errored out, would send back a 0 to the Main Form Text Box.
Is there a better way to do this, or does anyone know what I am doing wrong with Nz/IIF?
Thanks for any input.
I have tried to use..
=Nz(Sum([Log]))
=IIF(IsNull(Sum([Log]),0,Sum([Log])
....Sum([Log]) is null,...
All which did not work, I finally had to write a function on the main form that when it errored out, would send back a 0 to the Main Form Text Box.
Is there a better way to do this, or does anyone know what I am doing wrong with Nz/IIF?
Thanks for any input.