I have a table (named Responses
) with a field named q01
which contains numbers from 1 to 5. All entries contain valid numbers.
I created a query named query11
which counts the number of entries in Responses
with a number 1 in q01
. (Two columns in the query. First has Field: q01, Table: Responses, Total:Expression, Criteria: 1, Show is unchecked. Second has Field: Count_1_1:q01, Table:Responses, Total:Count, show is checked.) This shows the correct count when the query is run.
I created a report named rpt_General
which contains a text box (named txtQuery1-1) with the control source =[query11]![Count_1_1]
Any time this is run it displays #Name? in the text box. I have done some research and seen a number of references to the name of the text box being duplicated elsewhere, but I have changed it numerous times, deleted and recreated the report, and still cannot get it to display correctly.
query11
included in the report's Record Source? If not, try this as the text box's Control Source:=Dlookup("[Count_1_1]", "query11")
– HansUp=dcount("*", "[Responses]","q01=1")
– LiamH