Summing on the main form

G

Guest

Hi all,
I have a form called "CSQ" that has a continous subform called "follow up"
that has a field called "service level2" in its footer.
I have a field on the main form called "Service level",i want this field to
be equal to the following:
[Forms]![CSQ]![Follow up]![Form].[Service level2]+[Livello] /
[Forms]![CSQ]![Follow up]![Form].[FT]+1
as [livello] is a field on the main form.
My problem is that when [Forms]![CSQ]![Follow up]![Form].[Service level2] Is
Null or [Follow up]![Form].[FT] Is Null ,i don't get the required result
Is there a solution ?
 
G

Guest

Hi Pietro,

Use iif and isnull to achieve what you are after, like this:

iif(isnull([Forms]![CSQ]![Follow up]![Form].[Service level2]), 0,
[Forms]![CSQ]![Follow up]![Form].[Service level2])+iif(isnull([Livello]), 0,
[Livello]) /
iif(isnull([Forms]![CSQ]![Follow up]![Form].[FT]), 0, [Forms]![CSQ]![Follow
up]![Form].[FT]) +1

Damian.

ps: you could also use the nz function, but I prefer iif...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top