Keeping a running total in a text box

  • Thread starter Rashar Sharro via AccessMonster.com
  • Start date
R

Rashar Sharro via AccessMonster.com

Hi,

Here is my setup. I have a form that when it opens, it shows 3 columns.
Quantity1, Quantity2 and Total. When you enter a value in Quantity1 it
multiplies the values already in Quantity2 and then the Total is displayed.

I have another text box, txtBox3, that shows a target number, so if the
amount in the Total column, exceeds the amount in txtBox3, then the Total
column changes colour.

Lets say txtBox3 has a target value of 10. My problem is, that when I type in
a number greater than 10, it changes colour no problem. But, If I enter my
quantities as such 2 2 2 2 2, then my total column should change colour, but
it does. Therefore my variable that holds the quantities value is reseting to
0, and does not keep a running total.

So, how can I set up a variable that will hold a running total?

Thank you,

Rashar
 
R

RuralGuy

Are any of the controls bound to fields in an underlying table/query?
What code do you have behind the controls?

Hi,

Here is my setup. I have a form that when it opens, it shows 3 columns.
Quantity1, Quantity2 and Total. When you enter a value in Quantity1 it
multiplies the values already in Quantity2 and then the Total is displayed.

I have another text box, txtBox3, that shows a target number, so if the
amount in the Total column, exceeds the amount in txtBox3, then the Total
column changes colour.

Lets say txtBox3 has a target value of 10. My problem is, that when I type in
a number greater than 10, it changes colour no problem. But, If I enter my
quantities as such 2 2 2 2 2, then my total column should change colour, but
it does. Therefore my variable that holds the quantities value is reseting to
0, and does not keep a running total.

So, how can I set up a variable that will hold a running total?

Thank you,

Rashar

_______________________________________________
hth - RuralGuy (RG for short)
Please post to the NewsGroup so all may benefit.
 

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

Top