Using Equations to Fill in TextBox

  • Thread starter Thread starter Orion Cochrane
  • Start date Start date
O

Orion Cochrane

I have a form for data entry with one field in particular that I want
auto-populated based on values throughout this form. To get this value, I use
the Enter event in the textbox, but I keep getting Type Mismatch errors when
I do txt1.value-txt2.value and so on. Can I sum values from text boxes?
 
Yes, but the values have to be numeric.
A textbox contains text. <g>
Try...

CDbl(txt1.Value) + Val(txt2.Value)

Either CDbl or Val should work.
--
Jim Cone
Portland, Oregon USA



"Orion Cochrane"
<[email protected]>
wrote in message
I have a form for data entry with one field in particular that I want
auto-populated based on values throughout this form. To get this value, I use
the Enter event in the textbox, but I keep getting Type Mismatch errors when
I do txt1.value-txt2.value and so on. Can I sum values from text boxes?
 
Back
Top