Dsum function

J

Jedit

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
 
K

Ken Snell [MVP]

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

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

Steve Schapel

Jedit,

I agree 100% with Ken.

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

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