M
mharness
Hello,
I'm trying to get a grand total calculated on a main form by adding two
named subtotal sum(fields) in the form footers or two subforms. Either or
both of the subforms can occasionally not have any data which results in no
subtotal in one or both of the subforms and an #error in the grand total
field on the parent form.
I've tested the values in the immediate window and it's clear that the error
occurs when because one of the fields "has no value" and although there is
no doubt that is true, I'd prefer a zero instead of an error.
I have tried nz, isnull, and isempty. nz chokes--apparently because the
value is not null and isnull and isempty return false. I think I've done a
iif(dsum().. on this in the past but am hoping for a more efficient
solution. Any suggestions?
Many thanks,
Mike
I'm trying to get a grand total calculated on a main form by adding two
named subtotal sum(fields) in the form footers or two subforms. Either or
both of the subforms can occasionally not have any data which results in no
subtotal in one or both of the subforms and an #error in the grand total
field on the parent form.
I've tested the values in the immediate window and it's clear that the error
occurs when because one of the fields "has no value" and although there is
no doubt that is true, I'd prefer a zero instead of an error.
I have tried nz, isnull, and isempty. nz chokes--apparently because the
value is not null and isnull and isempty return false. I think I've done a
iif(dsum().. on this in the past but am hoping for a more efficient
solution. Any suggestions?
Many thanks,
Mike