by xp4268 on Sun Feb 07, 2010 8:09 pm
Create a program that allows the user to enter a value into a TextBox and then produces a count, a running total and a running average each time a CommandButton is clicked. The count, running total and running average should be displayed in three separate Labels. Example: the user types ‘10’ into the TextBox and then clicks the CommandButton. The Labels display 1, 10 and 10 respectively. The user clicks the CommandButton a second time. The Labels now display 2, 20, 10. The user replaces the ‘10’ with a ‘7’ and clicks the CommandButton a third time. The Labels now display 3, 27, 9. How can you avoid an error in case the user clicks the CommandButton BEFORE putting any data into the TextBox?