Dcount Problem

  • Thread starter Thread starter NotGood@All
  • Start date Start date
N

NotGood@All

I have a table name "Money" with a field named "returned" (yes/No). I'm
trying to count the lines where "returned" = "Yes". I'm using this code but
it gives me a -1.

xReturn: DCount("[returned]","money","[returned]")=Yes
 
If it is a boolean field (Yes/No datatype) then it would be:

xReturn: DCount("[returned]","money","[returned]=Yes")

Or

xReturn: DCount("[returned]","money","[returned]=True")

--
Bob Larson

Tutorials at http://www.btabdevelopment.com

__________________________________
 
Basically as an explanation, which I forgot to put in the last post, was that
you were essentially just providing the value of YES in your code because it
was outside of the DCount.
--
Bob Larson

Tutorials at http://www.btabdevelopment.com

__________________________________
 
Linq -

I guess you missed that part of the criteria was outside of the DCount and
not inside where it needed to be. If they use Abs like you've shown it will
only return 1 ALWAYS and not the count anyway. :-)
--
Bob Larson

Tutorials at http://www.btabdevelopment.com

__________________________________
 
With the newsgroups there are timing issues around various servers. So it is
possible to post before somone but have it show up after theirs does. The
forums, for example AWF, has one server it deals with so that is spot on.
But the newsgroups are totally different in that.
--
Bob Larson

Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
Thank you all for your responses. I would be lost without this site!!!!
Thanks again
 

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

Similar Threads

Access Dcount (multiple criteria) 3
Access Dcount function in access 0
DCount alwaysreturning 1 0
DCount Question 10
Dcount return incorrect result for filtered record 4
DCount Help on Subreport 5
DCount Problem 2
DCount in Subform question 1

Back
Top