Dsum function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My problem is that i need to use wild cards with Dsum

DSum("[Unit Cost]","QRY_Part_No_OPs","[mc]='M*'")

where I want to sum on everything begining with M, i THAUGHT i COULD JUST
DROP IN * BUT THIS RETURNS NO DATA?

eg
MILL
MILLC
MTURNC
MTURN
MGENERAL
MSUBCO

Help please
 
You must use the Like operator in order to use a wildcard:

DSum("[Unit Cost]","QRY_Part_No_OPs","[mc] Like 'M*'")
 
Jedit,

I agree 100% with Ken.

Another way to do it...
DSum("[Unit Cost]","QRY_Part_No_OPs","Left([mc],1)='M'")
 
Back
Top