Error for Save command in vb6

Thread Starter

love_sarah

Joined Apr 15, 2013
6
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??

Rich (BB code):
Private Sub cmdsave_Click()....i got the error here...
Adodc1.Recordset.Fields("Id") = txtId.Text
Adodc1.Recordset.Fields("Name") = txtName.Text
Adodc1.Recordset.Fields("Age") = txtAge.Text
Adodc1.Recordset.Fields("Address") = txtAddress.Text
Adodc1.Recordset.Fields("Phone No") = txtPhone.Text
Adodc1.Recordset.Fields("Bed No") = txtBed.Text
Adodc1.Recordset.Update

End Sub

Private Sub cmdDelete_Click()
If MsgBox("Are you sure you want to delete this?", vbQuestion + vbYesNo, "Message") = vbYes Then Adodc1.Recordset.Delete
If vbNo Then Exit Sub
End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Form_Load()
On Error Resume Next
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data  Source=C:\Users\Compaq\Desktop\Database_1\PatientI nfo.mdb;Persist  Security Info=False"
Adodc1.RecordSource = "Select * From Record1"
Set DataGrid1.DataSource = Adodc1
End Sub
 
Last edited by a moderator:
Top