Error for Save command in vb6

Discussion in 'Programmer's Corner' started by love_sarah, Oct 6, 2013.

  1. love_sarah

    Thread Starter New Member

    Apr 15, 2013
    6
    0
    hi...
    The following below are the codes which I used to connect vb6 with the Ms Access
    but when I'm trying to run I got error for Save command
    Procedure declaration does not match description of event or procedure having the same name..


    Can someone help me??

    Code ( (Unknown Language)):
    1.  
    2. [I]Private Sub cmdsave_Click()....i got the error here...[/I]
    3. Adodc1.Recordset.Fields("Id") = txtId.Text
    4. Adodc1.Recordset.Fields("Name") = txtName.Text
    5. Adodc1.Recordset.Fields("Age") = txtAge.Text
    6. Adodc1.Recordset.Fields("Address") = txtAddress.Text
    7. Adodc1.Recordset.Fields("Phone No") = txtPhone.Text
    8. Adodc1.Recordset.Fields("Bed No") = txtBed.Text
    9. Adodc1.Recordset.Update
    10.  
    11. End Sub
    12.  
    13. Private Sub cmdDelete_Click()
    14. If MsgBox("Are you sure you want to delete this?", vbQuestion + vbYesNo, "Message") = vbYes Then Adodc1.Recordset.Delete
    15. If vbNo Then Exit Sub
    16. End Sub
    17.  
    18. Private Sub cmdExit_Click()
    19. Unload Me
    20. End Sub
    21.  
    22. Private Sub Form_Load()
    23. On Error Resume Next
    24. Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data  Source=C:\Users\Compaq\Desktop\Database_1\PatientI nfo.mdb;Persist  Security Info=False"
    25. Adodc1.RecordSource = "Select * From Record1"
    26. Set DataGrid1.DataSource = Adodc1
    27. End Sub
    28.  
     
    Last edited by a moderator: Oct 6, 2013
Loading...