How do you get calculated fields on access forms

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I am trying to get a simple calculated field on a form - one that adds other
fields (e.g. =Maxinv1+maxinv2+maxinv3 ) but it wont add - what am I doing
wrong
 
I am trying to get a simple calculated field on a form - one that adds other
fields (e.g. =Maxinv1+maxinv2+maxinv3 ) but it wont add - what am I doing
wrong

What does 'Won't add' mean?
Do you get #error displayed in the control?
Do you get an incorrect result?
Do you get no result?
Do all of the fields have a value or are some Null?
If so, did you use the Nv() function in the expression?
If not, look it up in VBA help and try it.
=Nz(Maxinv1,0)+Nz(maxinv2,0)+Nz(maxinv3,0))

If that doesn't 'fix' it then, please post your exact expression.
Please give us an example of the data in those fields and the result
you expect.
Please give us what the actual result of your example data is.
Please include your Access version number.
 
Jeff said:
I am trying to get a simple calculated field on a form - one that adds
other
fields (e.g. =Maxinv1+maxinv2+maxinv3 ) but it wont add - what am I doing
wrong


What exactky have you done, and what was the (presumably undesired) result?

If Maxinv1, maxinv2, and maxinv3 are controls on the form, setting the
controlsource of a fourth control to:

=[Maxinv1]+[maxinv2]+[maxinv3]

.... ought to work, except that if any of those three controls is Null, the
result will be Null. If that's your problem, you can use a controlsource
expression like this:

=Nz([Maxinv1], 0)+Nz([maxinv2], 0)+Nz([maxinv3], 0)
 
Back
Top