Hi,
If this problem is still not solve you can try this:::
This is your code:
Private Sub cmdUpdate_Click()
Dim ar As ADODB.Recordset
Set ar = New ADODB.Recordset
ar.Open "SELECT * FROM co_authors WHERE ID = " & cmbID.Text
If ar.EOF Then ar.AddNew
Else: ar.Update
End If
ar!author_Name = txtName.Text
ar!country = txtCountry.Text
ar!paper_ID = txtPaperID.Text
ar.Update
End Sub
'Edit this line
else: ar.update
'make it
else: ar.edit
NOTE: is your ID in your query numeric? if it does you might need to do like this:
ar.Open "SELECT * FROM co_authors WHERE ID = " & val(cmbID.Text)
hope it helps.
Newvbguy
NewVBguy
Junior Poster in Training
71 posts since Mar 2005
Reputation Points: 13
Solved Threads: 3
This thread is like, four years old.... how about you start a thread of your own?
Comatose
Taboo Programmer
2,910 posts since Dec 2004
Reputation Points: 361
Solved Threads: 215