Reputation: 181
Shown below is my form so far, each student has taken two modules. What I wish to do is compare both pass/fail fields of both modules. If both are pass I wish the Pass/Fail box below to display pass. If one or both of the modules has failed I wish the box to display failed.
So far I have used the following expression within the control source using expression builder. Using the code below the box remains empty when viewing the query.
=IIf([Pass/Fail]="Pass","Pass","Fail")
I have also tried
=IIf([TK15 SubReport].[Report]![Pass/Fail]="Pass","Pass","Fail")
This displays passed if one of the two modules are passed and only displays failed if both modules have failed.
Has anyone got any ideas on how this can be done or is it not possible?
Shown below is a image of my relationships if they are needed
Thank you for your time.
Upvotes: 0
Views: 233
Reputation: 55806
Try with (where TK15 SubReport is the name of the subreport control):
=IIf(Abs(Sum(Me![TK15 SubReport].[Report]![Pass/Fail]="Pass"))=2,"Pass","Fail")
Upvotes: 1