S
Susan L
I have a report prepared monthly that sums totals of the controls on the
form. (Underlying data type is number.)
I need to be able to calculate a percentage that is the current month's
total/20034. So the percentage changes each month as new totals are
calculated.
I started with an IIf statement, which works. But since I need 12 statements
to evaluate each month, I think I should use Switch.
Here's the IIf statement that works:
=IIf(IsNull([sumAug]),IIf(Not
IsNull([sumJul]),FormatPercent([sumJul]/20034,2)))
Here's my attempt at using Switch, which generates "Error".
=Switch(IsNull([sumAug]),Not
IsNull([sumJul]),FormatPercent([sumJul]/20034,2)),IsNull([sumSep]),Not
IsNull([sumAug]),FormatPercent([sumAug]/20034,2)))
I've searched the posts extensively, but have not been able to solve my
problem. Can anyone help?
form. (Underlying data type is number.)
I need to be able to calculate a percentage that is the current month's
total/20034. So the percentage changes each month as new totals are
calculated.
I started with an IIf statement, which works. But since I need 12 statements
to evaluate each month, I think I should use Switch.
Here's the IIf statement that works:
=IIf(IsNull([sumAug]),IIf(Not
IsNull([sumJul]),FormatPercent([sumJul]/20034,2)))
Here's my attempt at using Switch, which generates "Error".
=Switch(IsNull([sumAug]),Not
IsNull([sumJul]),FormatPercent([sumJul]/20034,2)),IsNull([sumSep]),Not
IsNull([sumAug]),FormatPercent([sumAug]/20034,2)))
I've searched the posts extensively, but have not been able to solve my
problem. Can anyone help?