What is wrong with this formula? Help!

K

Kaylen

=IIf(DCount("*","UM Files","[13] IN ('Y','N')
AND [Review Date] =#" & [Enter Date] &
"#")=0,"N/A",FormatPercent((DCount("*","UM Files","[13] ='Y' and [Review
Date]=#" & [Enter Date] & "#")/DCount("*","UM Files","[13] IN ('Y','N') and
[Review Date=#" & [Enter Date] & "#")),0))

I put this formula in a query but I got an error message:

Missing ), ], or Item in query expression '[13] IN ('Y','N') and [Review
Date=#9/9/09#'.

then I got this error message:

This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables. (Error 3071)
 
D

Duane Hookom

IMHO, parameter prompts have no place in quality applications.

You are missing a "]" after the final Review Date. There may be other issues.
 
K

Kaylen

Thank you so so much Duane. This is the correct master formula I need for my
project. Thank you for your help!

Duane Hookom said:
IMHO, parameter prompts have no place in quality applications.

You are missing a "]" after the final Review Date. There may be other issues.

--
Duane Hookom
Microsoft Access MVP


Kaylen said:
=IIf(DCount("*","UM Files","[13] IN ('Y','N')
AND [Review Date] =#" & [Enter Date] &
"#")=0,"N/A",FormatPercent((DCount("*","UM Files","[13] ='Y' and [Review
Date]=#" & [Enter Date] & "#")/DCount("*","UM Files","[13] IN ('Y','N') and
[Review Date=#" & [Enter Date] & "#")),0))

I put this formula in a query but I got an error message:

Missing ), ], or Item in query expression '[13] IN ('Y','N') and [Review
Date=#9/9/09#'.

then I got this error message:

This expression is typed incorrectly, or it is too complex to be evaluated.
For example, a numeric expression may contain too many complicated elements.
Try simplifying the expression by assigning parts of the expression to
variables. (Error 3071)
 

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