Dsum() function Error

S

Shell

Dsum("[ActualQty]","[Material Arriving Status]","CO=Me!CO")
It gets "You cancelled previous operation"
 
D

Dirk Goldgar

In
Shell said:
Dsum("[ActualQty]","[Material Arriving Status]","CO=Me!CO")
It gets "You cancelled previous operation"

Yes, you generally get that message from the domain aggregate functions
when the query the function builds internally from the parameters you
provide is not valid. In this case, it's your use of the "Me" keyword,
which means nothing to the function.

If the CO field is a numeric field, try this:

Dsum("[ActualQty]","[Material Arriving Status]","CO=" & Me!CO)

If it's a text field (and won't contain the single-quote character, try
this:

Dsum("[ActualQty]","[Material Arriving Status]","CO='" & Me!CO &
"'")

If it might contain the single-quote character, but won't contain the
double-quote character, try this:

Dsum("[ActualQty]","[Material Arriving Status]","CO=" & _
Chr(34) & Me!CO & Chr(34))
 
Top