Results 1 to 2 of 2

Thread: need a help to a small button coding

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2011
    Posts
    1

    need a help to a small button coding

    Im totally newbie to VB.

    here is my coding for a simple database (service-based database)

    I created 4 buttons, ADDNEW, REMOVE, EDIT, SAVE. 3 buttons are ok. working fine. SAVE, REMOVE and ADDNEW. I could not coding to a EDIT or UPDATE button.

    Please anyone take a look in my coding and help me to create a EDIT or UPDATE button.... please frnz help to solve this... this is my midterm assignment......

    Public Class Form1



    Private Sub NewbieTBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewbieTBindingNavigatorSaveItem.Click

    Me.Validate()

    Me.NewbieTBindingSource.EndEdit()

    Me.TableAdapterManager.UpdateAll(Me.NewbieDataSet)



    End Sub



    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    'TODO: This line of code loads data into the 'NewbieDataSet.NewbieT' table. You can move, or remove it, as needed.

    Me.NewbieTTableAdapter.Fill(Me.NewbieDataSet.NewbieT)



    End Sub



    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.NewbieTBindingSource.AddNew()

    NameTextBox.Enabled = True

    End Sub



    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

    Me.NewbieTBindingSource.RemoveCurrent()

    End Sub



    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Me.Validate()

    Me.NewbieTBindingSource.EndEdit()

    Me.TableAdapterManager.UpdateAll(Me.NewbieDataSet)

    End Sub





    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

    ' Here HOW to write the coding for EDIT or UPDATE button???? plllzzzz help me...............

    End Sub

    End Class

  2. #2
    Fanatic Member ThomasJohnsen's Avatar
    Join Date
    Jul 2010
    Location
    Denmark
    Posts
    528

    Re: need a help to a small button coding

    Quote Originally Posted by vbmicro View Post
    ... this is my midterm assignment......
    *sigh*
    In truth, a mature man who uses hair-oil, unless medicinally , that man has probably got a quoggy spot in him somewhere. As a general rule, he can't amount to much in his totality. (Melville: Moby Dick)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width