Re: Help with some form calculations

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thank you, but what about IF one of the fields does not have a value?
because it works when all the controls have data but if of them does
not have data then it wont display the sum. Any ideas?

Answer: Nz(txt1,0) + Nz(txt2,0) + Nz(txt3,0) + Nz(txt4,0) + Nz(txt5,0)

I though about this, but the thing is I need to figured out a way of
showing this final SUMs in a report. Is there a better way of doing
this?
Answer: You can perform the calculation right on the report itself,
just like on a form. Just use the calculations that I gave you in my
previous post.

erick-flores wrote:
Answer: txt1+ txt2 + txt3 + txt4 + txt5. If you are calculating that
value in a textbox on a form, you need an = in front of it.
Thank you, but what about IF one of the fields does not have a value?
because it works when all the controls have data but if of them does
not have data then it wont display the sum. Any ideas?

Answer: First off, it is not really a good idea to save the results of
a calculation in a field in a database.
I though about this, but the thing is I need to figured out a way of
showing this final SUMs in a report. Is there a better way of doing
this?

.



Relevant Pages

  • Re: Sum of calculated fields
    ... Since this seems to be in a report, ... property instead of using Sum. ... total overtime add a text box named txtRunOvertime with the ... Note that your calculation of midnight is overly complex. ...
    (microsoft.public.access.formscoding)
  • Re: cant sum figures in a report ...help please
    ... Is there a way to sum them when they are not captured or held anywhere else? ... Based on the ones saying absent then it assigns the correct number of points. ... the field where the points are generated is called points, but it only exists on the report and no where else. ... Controls are objects that can display the value of a field. ...
    (microsoft.public.access.reports)
  • Re: report total problem
    ... I do think I said it wrong - payrate is a calculated ... So, if Sum is not aware of controls, how do I get a total ... the report ask for the parameter ...
    (microsoft.public.access.reports)
  • Re: Summing unbound controls at several group levels, and grand to
    ... What I am trying to do is sum a value from multiple records, ... It would be nice to do this in one report. ... Once this calculation is performed, ...
    (microsoft.public.access.reports)
  • Re: Overflow
    ... Make a copy of your report: select it in the database window, ... Delete the calculated controls from the copy. ... For an example of what might cause an Overflow, ... could there be a calculation that ...
    (microsoft.public.access.reports)