hi all

i m having a confusion kindly help me out

i have two textboxes for debit and credit entries. i want to disable the debit textbox when i get text in credit field similarly when i get data in credit textbox i want to disable the debit field.

waiting for reply
regards, saman

Use the TextBox_TextChanged event on both textboxes. If the first is changed, disable the second and vice versa.

Here's an example:

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        TextBox2.Enabled = False

    End Sub

    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        TextBox1.Enabled = False
    End Sub

Niek