0

I got an error with my codes? Is anybody can help me
?
The Error list said Identifier Expected? the error pertains on the last Underscore in my code but i dont know how to solve the error, Hope can someone will give an Idea to make it right :)

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Form1.Personal_InfoTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, _
                                               Me.TextBox3.Text, Me.TextBox4.Text, _
                                                Me.TextBox5.Text, Me.TextBox6.Text, _
                                                Me.TextBox7.Text, Me.TextBox8.Text, _
                                               Me.TextBox9.Text, Me.TextBox10.Text, _)
        MsgBox("Complete")
3
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by tinstaafl
0

i think it should be this way

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Form1.Personal_InfoTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, _
        Me.TextBox3.Text, Me.TextBox4.Text, _
        Me.TextBox5.Text, Me.TextBox6.Text, _
        Me.TextBox7.Text, Me.TextBox8.Text, _
        Me.TextBox9.Text, Me.TextBox10.Text)
        MsgBox("Complete")

Just check once

Edited by poojavb

0

Your problem is probably the last comma. If you have no more parameters to add then you shouldn't have a comma there. The last underscore shouldn't hurt anything but it is unnecessary.

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Form1.Personal_InfoTableAdapter.Insert(Me.TextBox1.Text, Me.TextBox2.Text, _
                                            Me.TextBox3.Text, Me.TextBox4.Text, _
                                            Me.TextBox5.Text, Me.TextBox6.Text, _
                                            Me.TextBox7.Text, Me.TextBox8.Text, _
                                            Me.TextBox9.Text, Me.TextBox10.Text)
    MsgBox("Complete")

oops, great minds think alike lol

Edited by tinstaafl

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.