Hi Please assist I have a field that stores Answer Yes and No as text as the field gets updated via other sources. I want to count the Yes answers.

RobertVerster

New member
Local time
Today, 22:38
Joined
Apr 25, 2020
Messages
10
1587796397514.png
 
Hi Robert
You posted to Sample databases which is a moderated area and not used for asking questions. I moved it to forms.

Its unclear from your post whether Answers is a text field or a Yes/No field.
If its text then you need to put quotes around Yes in your expression.
If its Yes/No, suggest you replace Yes with True in the expression and don't use quotes.

BUT is it a single or a continuous form?
 
you need to have an unbound textbox on the form's footer:
=count(iif([answers]="yes", 1, null))

then you refer the unbound textbox on the detail section textbox:

=[unboundtexboxonfootername]
 
Hi Robert
You posted to Sample databases which is a moderated area and not used for asking questions. I moved it to forms.

Its unclear from your post whether Answers is a text field or a Yes/No field.
If its text then you need to put quotes around Yes in your expression.
If its Yes/No, suggest you replace Yes with True in the expression and don't use quotes.

BUT is it a single or a continuous form?

Hi its a single form The Hi Lighted fields is teh once that I need to use to count the Yes replyes
1587798673578.png
 
Robert
The new screenshot definitely won't work.
You didn't respond to all my points.
Did you try my suggestions or those of @arnelgp?
 
sorry, you can put it directly into the unbound textbox:

=Count(Iif([Answers] = "Yes", 1, Null))
 
Hi I would like to count the Answer Yes in the sub for and display the count in the Top/Header Form.
1587804593399.png
 
add an Unbound Textbox (txtTotalYes) to the Form's header section.
on its ControlSource, put:

=DCount("1", "CovidFormSubQuestionsQry", "InspectionNumber=" & [InspectionNumber] & " And Answers='Yes'")
 
Thanks I did get your reply. I did it and then open the form the field like just flickers with a error message inside.
 
you replace "CovidFormSubQuestionsQry" with the Query name you are using for the subform.
 

Users who are viewing this thread

Back
Top Bottom