RUN-TIME ERROR 2455

G

gator

I get this error with the following code...You entered an expression that has
an invalid reference to the property Bookmark. Can someone tell me how to
correct it?

CODE:

Private Sub Command15_Click()
Dim mycon As New ADODB.Connection
Dim ADOrs As New ADODB.Recordset
Set mycon = CurrentProject.Connection

ADOrs.Open "AcctPayDetails", mycon, adOpenKeyset, adLockOptimistic
ADOrs.AddNew
ADOrs!Account = Me.Text10
ADOrs!Date = Me.Text16
ADOrs.Update
ADOrs.Close


ADOrs.Open "Accounts", mycon, adOpenKeyset, adLockOptimistic
ADOrs.Find "ID='" & Me!Text10 & "'"
If Not ADOrs.EOF Then
Me.Bookmark = ADOrs.Bookmark
ADOrs!ID = Me.Text10
ADOrs!AccountName = Me.Text12
ADOrs.Update
Else
ADOrs.AddNew
ADOrs!ID = Me.Text10
ADOrs!AccountName = Me.Text12
ADOrs.Update
End If
ADOrs.Close

mycon.Close
Me.Child20.Requery
Me.lstGroup.Requery
Me.List8.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top