PDA

View Full Version : Adding Text boxes to a Lable



The"Truth"
11-14-2008, 06:13 AM
I am currently adding several text boxes and inputting them to a label on the _change event. This works great but when I make a correction in the cell it erases the answer that is in the label. Is there any way to prevent the answer from vanishing when the user makes a change to the text box?

Here is a sample of what I am doing.

If TextBox10.Text > "" Then
Label27.Caption = Val(TextBox10.Text) + Val(TextBox11.Text) _
+ Val(TextBox12.Text) + Val(TextBox13.Text) + Val(TextBox14.Text) + Val (TextBox15.Text) _
+ Val(TextBox16.Text) + Val(TextBox17.Text) + Val(TextBox18.Text) + Val(TextBox19.Text) _
+ Val(TextBox20.Text) + Val(TextBox21.Text) + Val(TextBox22.Text) + Val(TextBox23.Text) _
+ Val(TextBox24.Text) + Val(TextBox25.Text) + Val(TextBox26.Text) + Val(TextBox27.Text) _
+ Val(TextBox28.Text) + Val(TextBox29.Text) + Val(TextBox30.Text) + Val(TextBox33.Text)
ElseIf TextBox10.Text = "" Then
Label27.Caption = ""
End If

Bob Phillips
11-14-2008, 07:25 AM
Drive it from a commandbutton, not the Textbox change event.

The"Truth"
11-14-2008, 09:10 AM
I had it that way but the form seemed too busy, so I changed it to the _Changed event in hopes of making it easier. Do you have any suggestions?

Bob Phillips
11-14-2008, 10:05 AM
Not without seeing it and understanding your problem.