-
Show running total
Back again. My previous question returned some useful code but I still couldn't get it to run properly so I made some changes to the form and hey presto! its looking a lot better already.
Code is
If optPaintA = true then
txtPaintCost = val(lblPaintA)
end if
this is repeated for options B and C
Also same code for Tiles and Carpet with relevant names.
each result in txt***Cost is added to a txtTotalCost
and only displays when the textbox is clicked.
It increments the running total but I have to click on the totalcost box to see it each time.
Now what I would like this to do is that when each value is in the relevant Cost box that it displays in the txtTotalCost box as a running total without having to click on the totalcost box
Rosi
-
If I understand what you are asking then you can use the txt***_KeyPress() or txt***_Change() event to update the txtTotalCost each time a new value is entered for Paint, Tile, or Carpet. Create a sub routine that figures all of the values for the three and then call that sub from the KeyPress event in all three textboxes.
Greg