It's likely the names you're using that's causing the confusion.
Your second argument (anotherfieldxxx) sounds like the name of a field in
a
table, whereas it has to be the name of a table or query.
If that's giving you a valid numeric value, though, I see no reason why
=-DSum("[one filed]","[anotherfieldxxx]") * 20
shouldn't work.
--
Doug Steele, Microsoft Access MVP
(no private e-mails, please)
Ok I will show the expression more like the real thing:
The text box control source would be =-DSum("[one
filed]","[anotherfieldxxx]")
this works it gives me a total of the staff trained in those fields
(which
are boolean check boxes)
now I want to multiply this value by the hours it takes to complete the
training and then the cost of the course.
:
achieved by =-DSum("[xxxxxx]","[anotherfieldxxx]")
Your DSum expression does not look correct to me. What does the
"[xxxxxx]"
part represent. It should be the name of a field. The next part,
"[anotherfieldxxx]", should be the name of a table or query (the
Domain).
All domain aggregrate functions (DSum, DMax, DMin, DLookup, etc.)
share
the
same common parameters:
DFunction("Expression", "Domain", "OptionalCriteria")
Here is a good article on The Access Web for your reference:
DLookup Usage Samples
http://www.mvps.org/access/general/gen0018.htm
Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
:
I have a report with some calculated fields that produce a sum of
values in a
query this is achieved by =-DSum("[xxxxxx]","[anotherfieldxxx]") I
need
to
multiply this by another value(i.e. 20.00 dollars and can't get this
to
work
not sure why