Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NoMatch Error - Method or Data member not found 1

Status
Not open for further replies.

CptTom

Programmer
Jul 16, 2001
117
US
I have the following references set: VBA, MS Access 10.0, OLE Automation & MS DAO 3.6 Object Library. Yet when I complie I get the error message, Method or Data Member not found. Any ideas?
 
Hi!

Let us know what line in your code Access doesn't like.

Jeff Bridgham
 
Set rsXN3 = CurrentDb.OpenRecordset("xn3", dbOpenTable)
Set rsNiiN = CurrentDb.OpenRecordset("NSN", dbOpenTable)
rsNiiN.Index = "NSN_Index"

Do While Not rsXN3.EOF
strPartNumber = rsXN3.Fields("NSN")
If strPartNumber <> &quot;&quot; Then
rsNiiN.Seek &quot;=&quot;, strPartNumber
If rsNiiN.NoMatch Then
***THE ABOVE LINE ERRORS OUT***
rsNiiN.AddNew
rsNiiN.Fields(&quot;NSN&quot;) = strPartNumber
rsNiiN.Update
End If
End If
 
Hi!

I can't see anything wrong with what you have. Unless there may be some reason that the Db thinks that rsNiiN is an ADO type of recordset, which doesn't have the NoMatch method. I tried your code in a sample Db and had no problem until I changed the recordset declaration to ADODB.Recordset. If you have a reference to ADO in your Db and that reference is higher on the reference lists than the DAO reference, then any unspecified declaration will be assumed to be ADO. The best solution is to go to the declaration and specify ADAO.Recordset.

hth
Jeff Bridgham
 
THANKS THANKS THANKS THANKS
All I did was move the DAO 3.6 to the highest possible priority and recompile.

Larry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top