Thanks for the help Arvin,
I have six bound controls, QtySold1 through QtySold6. I want to show the
total for these six controls on the PartsForm, hence the calculation in an
Unbound Control named TotSold:
=nz([QtySold1])+nz([QtySold2])+nz([QtySold3])+nz([QtySold4])+nz([QtySold5])+
nz([QtySold6])
This calculation is giving me the correct value for each record on the Form.
Now I want to show on the Form, a "Constant" value (until I update one of
the QtySold fields), the TOTAL of all the QtySold fields, for all records in
the table.
Let me know if I didn't explain well enough, or give you enough information.
Thanks,
Bernie
Arvin Meyer said:
DSum is not the function you wish to use. DSum is the total of all records
in a "domain". A "domain" is a table or query. So you must have stored all
those values to add them. They will not include values on a form until
those
values have benn saved (the record updated).
TotSold, being an unbound control, is not storing the calculation. That's
generally a good thing since most calculations shouldn't be stored anyway.
Perhaps it might be a good idea to give us a general idea of what you are
trying to accomplish, and we can suggest a method for you.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
bw said:
My PartsForm has an unbound control TotSold as follows:
=nz([QtySold1])+nz([QtySold2])+nz([QtySold3])+nz([QtySold4])+nz([QtySold5])+
nz([QtySold6])
I would like to show the SUM of all of the TotSold values on the form in
another unbound control GrandTotSold.
and I have tried various variations of the following:
=DSum("[TotSold]","tblParts")
but since I don't know what I'm doing, I'm not getting the right answer.
Can someone please explain?
Thanks,
Bernie