K
Kaylen
I have a table with 3 columns:
Review Date
STDID
Answers
I want to run a query to calculate the % of Y/ Y+N for all the answers of a
specific standard (STDID) for a specific review date. Ignore N/A in the
denominator if the answer is N/A.
For example:
I want a query to calculate the percent Y/Y+N of all the answers of the
standard 2 (STD ID =2) for a date that the user will enter:
Expr2: IIf(DCount("*","Answers","[STD ID]=2 AND [Answers] IN ('Y','N') AND
[Review Date] =#" & [Confirm Review Date] &
"#")=0,"N/A",FormatPercent((DCount("*","Answers","[STD ID]=2 AND [Answers]
='Y' and [Review Date]=#" & [Confirm Review Date] &
"#")/DCount("*","Answers","[STD ID]=2 AND [Answers] IN ('Y','N') and [Review
Date]=#" & [Confirm Review Date] & "#")),0))
When query run, I got an error says: "Data type mismatch in criteria
expression." and the expr field is empty when I click OK. Any help on fixing
this formula is truely appreciated!!!
Review Date
STDID
Answers
I want to run a query to calculate the % of Y/ Y+N for all the answers of a
specific standard (STDID) for a specific review date. Ignore N/A in the
denominator if the answer is N/A.
For example:
I want a query to calculate the percent Y/Y+N of all the answers of the
standard 2 (STD ID =2) for a date that the user will enter:
Expr2: IIf(DCount("*","Answers","[STD ID]=2 AND [Answers] IN ('Y','N') AND
[Review Date] =#" & [Confirm Review Date] &
"#")=0,"N/A",FormatPercent((DCount("*","Answers","[STD ID]=2 AND [Answers]
='Y' and [Review Date]=#" & [Confirm Review Date] &
"#")/DCount("*","Answers","[STD ID]=2 AND [Answers] IN ('Y','N') and [Review
Date]=#" & [Confirm Review Date] & "#")),0))
When query run, I got an error says: "Data type mismatch in criteria
expression." and the expr field is empty when I click OK. Any help on fixing
this formula is truely appreciated!!!