Adding text boxes in one?

G

ghost

Hi,
I have a continual form with text boxes, what I need is how to add the value
in all text box and show the results in another text box at the footer of the
form.
Your help is highly appreciated
 
D

dcichelli

Hi,
I have a continual form with text boxes, what I need is how to add the value
in all text box and show the results in another text box at the footer of the
form.
Your help is highly appreciated

Just set the field in the footer (or create an unbound field) that is
=[textbox1]&" "&[textbox2]&" "&[texbox3]

Or if you want to start a new line in your text box for each field get
fancy and do this = [textbox1]&chr(13) & chr(10)&[textbox2]&chr(13) &
chr(10)&[textbox3]

Diane
 
J

John W. Vinson

Hi,
I have a continual form with text boxes, what I need is how to add the value
in all text box and show the results in another text box at the footer of the
form.
Your help is highly appreciated

Put a textbox control in the Form Footer, and set its Control Source
to

=Sum([fieldname])

where fieldname is the name of the field to which your form textbox is
bound (not the name of the textbox itself, but the underlying field).

This sum will not be (and should not be) stored in your table - just
calculate it on demand as needed.

John W. Vinson [MVP]
 
R

Rob Parker

Simply set the Control Source for the textbox in the footer to:
=Sum([NameOfBoundFieldToBeAdded])

HTH,

Rob
 
G

ghost

thx John for your fast responding
put i need to sorte the value and the value updated when another text box is
added
thx.

John W. Vinson said:
Hi,
I have a continual form with text boxes, what I need is how to add the value
in all text box and show the results in another text box at the footer of the
form.
Your help is highly appreciated

Put a textbox control in the Form Footer, and set its Control Source
to

=Sum([fieldname])

where fieldname is the name of the field to which your form textbox is
bound (not the name of the textbox itself, but the underlying field).

This sum will not be (and should not be) stored in your table - just
calculate it on demand as needed.

John W. Vinson [MVP]
 
J

John W. Vinson

thx John for your fast responding
put i need to sorte the value and the value updated when another text box is
added

Again:

You do NOT need to store the value.
You *SHOULD NOT* store the value.
If you store the value *IT WILL USUALLY BE WRONG*. Do you want your
database to contain data that is almost sure to be incorrect!?

If you are assuming that you must have this total stored in your table
in order to report it, that assumption is incorrect. You can calculate
the total on a Report or in a Query; you can use that Query for
searching, for sorting, as the basis for a report, for exporting, etc.

Once in a great while it's necessary to "break the rules" and store a
calculated value, but unless you can convince me otherwise, I don't
see that this is such a case.


John W. Vinson [MVP]
 
G

ghost

Thx a lot,
Know I got the point


John W. Vinson said:
Again:

You do NOT need to store the value.
You *SHOULD NOT* store the value.
If you store the value *IT WILL USUALLY BE WRONG*. Do you want your
database to contain data that is almost sure to be incorrect!?

If you are assuming that you must have this total stored in your table
in order to report it, that assumption is incorrect. You can calculate
the total on a Report or in a Query; you can use that Query for
searching, for sorting, as the basis for a report, for exporting, etc.

Once in a great while it's necessary to "break the rules" and store a
calculated value, but unless you can convince me otherwise, I don't
see that this is such a case.


John W. Vinson [MVP]
 
Top