Results 1 to 4 of 4

Thread: [RESOLVED] How to edit recordset in ms access 2003 database using vb 6.0

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2009
    Location
    Manila, Phillippines
    Posts
    54

    Resolved [RESOLVED] How to edit recordset in ms access 2003 database using vb 6.0

    Hello..


    Anyone know how to edit recordset

    I want to edit existing record in my database but my problem is my record did not changed,Here's my code,


    rs.Edit
    rs!name = TxtPen.Text
    rs!Branch = TxtBranch.Text
    rs!Home_Address = TxtHome.Text
    rs.Update

    Thanks

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Re: How to edit recordset in ms access 2003 database using vb 6.0

    That looks fine to me. Are you sure it is not being updated?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2009
    Location
    Manila, Phillippines
    Posts
    54

    Re: How to edit recordset in ms access 2003 database using vb 6.0

    Quote Originally Posted by dee-u View Post
    That looks fine to me. Are you sure it is not being updated?
    Thanks for the reply,


    Yes sir the record is not updated,
    i have 1 button for edit and 1 button for save

    Here's my code,

    'Edit records

    Private Sub CmdEdit_Click()
    If Not rs.RecordCount = 0 Then
    rs.Edit
    TxtName.Enabled = True
    TxtBranch.Enabled = True
    TxtHome.Enabled = True
    Else
    MsgBox "There's no records to edit", vbApplicationModal, "Massage"
    End If

    'Saving record after editing

    Private Sub CmdSave_Click()
    rs.Edit
    rs!name = TxtPen.Text
    rs!Branch = TxtBranch.Text
    rs!Home_Address = TxtHome.Text
    rs.Update

    Thanks

  4. #4

    Thread Starter
    Member
    Join Date
    Nov 2009
    Location
    Manila, Phillippines
    Posts
    54

    Re: How to edit recordset in ms access 2003 database using vb 6.0

    Quote Originally Posted by ryanbesitulo View Post
    Thanks for the reply,


    Yes sir the record is not updated,
    i have 1 button for edit and 1 button for save

    Here's my code,

    'Edit records

    Private Sub CmdEdit_Click()
    If Not rs.RecordCount = 0 Then
    rs.Edit
    TxtName.Enabled = True
    TxtBranch.Enabled = True
    TxtHome.Enabled = True
    Else
    MsgBox "There's no records to edit", vbApplicationModal, "Massage"
    End If

    'Saving record after editing

    Private Sub CmdSave_Click()
    rs.Edit
    rs!name = TxtPen.Text
    rs!Branch = TxtBranch.Text
    rs!Home_Address = TxtHome.Text
    rs.Update

    Thanks
    I found the solution with my own

    Thanks for the effort

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