View Single Post
  #2  
Old December 10th, 2008, 12:22 PM posted to microsoft.public.access.tablesdbdesign
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default dcount syntax help

=DCount("[Vendor]",'Expenses","[Vendor='Walmart' AND [Cost]400")

A currency field stores its values as numbers, without $ or other monetary
symbol.
--

Ken Snell
MS ACCESS MVP
http://www.accessmvp.com/KDSnell/



"Tom" wrote in message
...
I have a databse with a table called Expenses. In that table I have a field
calles Vendors which is a text field and a field called Cost which is a
currency field.
I need to count the number of times that for example something was
purchaed
from Walmart so I used the syntax
=dcount("[Vendor]","Expenses","[Vendor]='Walmart'") and that works

my problem is with multiple conditions
I need to count the number of times the vendor was walmart and the cost
was
more than $400.00

I tried
=dcount("[Vendor]",'Expenses",'[Vendor='Walmart' AND [Cost]'$400.00'')
and
all I get is an error any suggestions would be most appreciated . Thanks
is
advance

Tom