Formula Wizard Anyone?

K

Kaylen

I have an "ANSWER" table with 4 fields:
Review Date
STD ID
File #
Ans

Here is my current formula:

T2: IIf(DCount("*","Answers","[Ans] IN ('Y','N') AND [Review Date] =#" &
[Confirm Review Date] &
"#")=0,"N/A",FormatPercent((DCount("*","Answers","[Ans] ='Y' and [Review
Date]=#" & [Confirm Review Date] & "#")/DCount("*","Answers","[Ans] IN
('Y','N') and [Review Date]=#" & [Confirm Review Date] & "#")),0))

I want to add another part to this formula, "STD ID =2" so that the formula
will select to calculate the files of STD=2 in the table. Where can I
include STD ID =2 in this current formula to make it work? HELP PLEASE!!!
 
C

Clifford Bass

Hi Kaylen,

Where are you using this? In a query? If so, how about doing this
instead, which will allow you to specify a value for STD ID or leave it blank
for all STD IDs:

PARAMETERS [Confirm Review Date:] DateTime, [Enter STD ID:] Long;
SELECT
IIf(Count(*)=0,"N/A",FormatPercent(Sum(IIf([Ans]='Y',1,0))/Count(*),0)) AS T2
FROM ANSWER
WHERE (((ANSWER.[STD ID])=[Enter STD ID:]) AND ((ANSWER.[Review
Date])=[Confirm Review Date:])) OR (((ANSWER.[Review Date])=[Confirm Review
Date:]) AND (([Enter STD ID:]) Is Null));

Clifford Bass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top