: : How are you binding your textbox to the dataset?
: :
: : Have you tried doing the code in the TextBox1.TextChanged event?
: :
: :
: :
: : Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
: : TextBox3.Text = CDbl(Textbox1.Text) * CDbl(Textbox2.Text)
: : 'CDbl stands for Covert Double, which converts an object (such as string or integer) to a Double value.
: : 'A Double variable holds Decimal (floating point) data (numbers such as 2.12)
: : 'Where as an integer would round to the nearest whole number (CInt)
: : 'CInt(2.12) = 2
: : 'CInt(2.5) = 3
: :
: : 'This event will be triggered each character you type or delete from the text box, or any other time the value of TextBox1 changes...
: : End Sub
: :
: :
: :
: : Hope this helps, if this doesn't help you solve your problem, try
: : passing some code to us and a different description.
:
: The textboxes that I will use to calculate are bound to the dataset
: so they change as I navigate from record to record. I tried the
: text_change event anyway and it didn't work.
:
:
Assuming that you're using a BindingSource and BindingNavigator on your Form, you can handle the CurrentChanged event of the BindingSource object to determine when the user navigates to a new record.
Within the CurrentChanged event handler use the Current property of the BindingSource object to get the record currently loaded onto the form.