Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a code which automatically input 0 in textboxes when a user chooses 2 in ComboBox, so would like to know the code for those 0's to be displayed in database.
VB
Private Sub ComboBox2_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave
        If Me.ComboBox2.Text = "1" Then
            Me.TextBox19.Focus()
        Elseif Me.ComboBox2.Text = "2" Then
            Me.TextBox19.Text = "0"
            Me.TextBox20.Text = "0"
            Me.TextBox21.Text = "0"
            Me.TextBox22.Text = "0"

            'Me.TextBox23.Enabled = False
            'Me.TextBox24.Enabled = False
            Me.TextBox26.Focus()
        End If
    End Sub
Posted
Updated 8-Dec-14 3:37am
v2
Comments
ZurdoDev 8-Dec-14 9:43am    
Where are you stuck? Use the SqlConnection and SqlCommand objects to interact with Sql.
Member 10998396 16-Dec-14 5:07am    
Thanks, i managed to come up with a solution.i did use Sqlconnection

1 solution

As per the comments, use the SqlCommand SqlConnection objects.

Glad to hear we can close this one out.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900