DCount formula problem. Help please.

K

Kaylen

I really need help on this. I want a field in a query to calculate the
pecentage of the count "Y" over the sum of "Y" and "N". The formula is use
for this is:
=DCount("[UM]![5]","UM","[UM]![5]='Y'")/(DCount("
[UM]![5]","UM","[UM]![5]='Y'")+DCount(" [UM]![5]","UM","[UM]![5]='N'"))

But when all my data for that column is "N/A", I get the error message in
the query:

"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." when I run the query.

If I try to put that same formula into a control source of a text box, I get
the return value of #NUM!. I guess I want the formula to works but if none
the data in the feild is a "Y" or "N"" then I want it to return "N/A" instead
of error messages. Any advice on this problem quick is very much appreciated.
 

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