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
 
Back
Top