how do I calculate a field?...or add them up?

  • Thread starter Thread starter RON
  • Start date Start date
R

RON

Hello here is my situation.

I have a form that has a sunform on it. there is a field QTY that is taken
from a table. I am doing the subform in tabular format and when I run the
form usually or in this example I get 4 listings, there are other items on
the form such as ProductID, Price, Qty etc.

So these four products show up for this particular customer and the
quantities of each are:4, 2, 2, 5

How do I add a Textbox to the form that will say Total Qty and then it would
add up those 4 values and return 13 as the answer?

Or is the quantities were: 2, 5, 5, 5, 1, 3 it would return 21

thanks
 
RON said:
I have a form that has a sunform on it. there is a field QTY that is taken
from a table. I am doing the subform in tabular format and when I run the
form usually or in this example I get 4 listings, there are other items on
the form such as ProductID, Price, Qty etc.

So these four products show up for this particular customer and the
quantities of each are:4, 2, 2, 5

How do I add a Textbox to the form that will say Total Qty and then it would
add up those 4 values and return 13 as the answer?

Or is the quantities were: 2, 5, 5, 5, 1, 3 it would return 21


Use a text box in the header or footer section of the form
with the data you want to total. The expression would
simply be:
=Sum(QTY)
 
I have a form that has a sunform on it. there is a field QTY that is taken
from a table. I am doing the subform in tabular format and when I run the
form usually or in this example I get 4 listings, there are other items on
the form such as ProductID, Price, Qty etc.

You need to change the subform from Datasheet (I'm guessing that's
what you mean by "tabular") to Continuous. The continuous form can be
made to look very like a datasheet if you wish.

Make the Form Header or Footer visible, and put a textbox on it with a
control source

=Sum([Qty])

John W. Vinson[MVP]
 
Back
Top