add values of controls on a form-expression not working

G

Guest

Hi,
My data base has the following currency fields in a table which I want to
sum on a form for each record:AmntYr1, AmntYr2, AmntYr3. So on my form I
created the text box Cumulative with the control source
"=[AmntYr1]+[AmntYr2]+[AmntYr3]" This returned an empty field on the form. So
I thought it was due to null values in some of the Amnt fields and changed
the expression to =nz([AmntYr1]+[AmntYr2]+[AmntYr3],0) which returns "0" for
each record. So I deleted the ",0" and it went back to returning an empty
field.

What the heck am I missing?????

Thanks!!
 
G

Guest

Your control source doesn't know what you are talking about. It will not
return an error, it will just ignore your. The easiest solution would be to
create 3 hidden controls on your form bound to the 3 fields. Then, there is
the issue that a contorl source will not understand Me. So to get the number
you want it will need to be
=Forms!MyFormName!txtAmntYr1 + Forms!MyFormName!txtAmntYr2 +
Forms!MyFormName!txtAmntYr3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top