Results 1 to 40 of 63

Thread: ADO Beginners Tutorial

Hybrid View

  1. #1
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: ADO Beginners Tutorial

    For "update" just use the same code as cmdAdd_Click, but without the AddNew line.

  2. #2
    Addicted Member
    Join Date
    Nov 2005
    Posts
    185

    Re: ADO Beginners Tutorial

    VB Code:
    1. Private Sub cmdAdd_Click()
    2.     With rs
    3.         .AddNew 'adding new record
    4.         .Fields("field2") = Text1.Text 'setting field2 = whatever is typed in text1
    5.         .Fields("field3") = Text2.Text 'as above
    6.         .Fields("field1") = combo1.Text 'as above
    7.         .Update 'this updates the recordset etc.
    8.     End With
    9. End Sub

    Hi, for "update" existing data....which code should I delete please..???

    Thanks,

    Jennifer

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