Calculate the error to detect a single head of household

Hello,
In a household questionnaire, I want to program an error if the number of heads of household is greater than 1. However, the program I created here only displays the error after I have finished entering all the household members.
What I want is to display the error as soon as a second household member declares themselves as head of household. For clarification, a person is head of household when Q2=1.
I have attached an image of the program I wrote.
Thanks in advance

You can move (only) the last note inside the repeat loop.

Hint: Your logic also allows NO head of household..

1 Like

Welcome back to the community, @konanstephanenekoffi! This post discussed previously should help you solve your issue:

Hello @Kal_Lam, thanks for the reply. This option partially solves the problem. Indeed, with this example, it is after having finished entering all the household members. However, I wanted the error message to appear as soon as there is more than one household member declared as head of household.
Thanks

@konanstephanenekoffi, maybe you could also try this approach that has been discussed previously:

@Kal_Lam, thanks for the help and sorry for the delay in responding. This option perfectly allows you to list the householder first.
Sincerely,