Method or data member not found (Error 461)

E

Erik Gjertsen

I Have use following procedure:

Private Sub slave_AfterUpdate()
Dim rst As Recordset
Dim strSearchName As String

Set rst = Me.RecordsetClone
strSearchName = Str(Me!TkNr)
rst.Find "TkNr = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub

And get wrong mesages on NoMatch.
with error 461

Can someone help me

Erik Gjertsen
 
D

Douglas J. Steele

Since you don't specify what version of Access, I'll to guess that you're
using either Access 2000 or 2002. The code you're using is DAO. By default
Access 2000 and 2002 use ADO.

With any code module open, select Tools | References from the menu bar,
scroll through the list of available references until you find the one for
Microsoft DAO 3.6 Object Library, and select it. If you're not going to be
using ADO, uncheck the reference to Microsoft ActiveX Data Objects 2.x
Library

If you have both references, you'll find that you'll need to "disambiguate"
certain declarations, because objects with the same names exist in the 2
models. For example, to ensure that you get a DAO recordset, you'll need to
use Dim rst as DAO.Recordset (to guarantee an ADO recordset, you'd use Dim
rst As ADODB.Recordset)

The list of objects with the same names in the 2 models is Connection,
Error, Errors, Field, Fields, Parameter, Parameters, Property, Properties
and Recordset


--
Doug Steele, Microsoft Access MVP



I Have use following procedure:

Private Sub slave_AfterUpdate()
Dim rst As Recordset
Dim strSearchName As String

Set rst = Me.RecordsetClone
strSearchName = Str(Me!TkNr)
rst.Find "TkNr = " & strSearchName
If rst.NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = rst.Bookmark
End If
rst.Close
End Sub

And get wrong mesages on NoMatch.
with error 461

Can someone help me

Erik Gjertsen
 
E

Erik Gjertsen

Yes I use Access 2000
I have followed your proposal and it still not work.
Have someone else any proposal?
 

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