NoMatch Property

G

Guest

I am trying to install the password code from the northwind sample database
into a db that I have created. The issue is that I get a compile error
because my database does not like the NoMatch property. Does anyone know
what library it is in or just why it will not work? I am using access 2000.
Thanks in advance for the help.
 
D

Dirk Goldgar

In
WildlyHarry said:
I am trying to install the password code from the northwind sample
database into a db that I have created. The issue is that I get a
compile error because my database does not like the NoMatch property.
Does anyone know what library it is in or just why it will not work?
I am using access 2000. Thanks in advance for the help.

I don't know the code you're referring to, but it could be that you are
running into the common problem of conflicting ADO and DAO Recordset
types. Both the DAO and the ADO object libraries define a Recordset
object. By default, Access 2000-2002 sets a reference to ADO and not to
DAO. Even if you later add a reference to DAO, it defaults to a lower
priority than the ADO reference, though you can move it up in the
priority list.

Therefore, by default, a declaration such as "Dim rs As Recordset" is
going to be declaring an ADO recordset. But the ADO Recordset object
does not have a NoMatch property, so the code doesn't compile. Other
errors are also commonly encountered for this reason, such as a type
mismatch when you try to assign the form's (DAO)
RecordsetClone to an (ADO) recordset that has been declared.

To correct this, be sure you've added a reference to the Microsoft DAO
3.6 Object Library (via the Tools -> References... dialog in the VB
Editor), and either remove the ADO (Microsoft ActiveX Data Objects)
reference -- if you're not going to use it -- or qualify your
declaration of DAO objects with the "DAO." prefix, like this:

Dim rs As DAO.Recordset
 

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

Similar Threads

NoMatch 5
Correct error message 3
compile error 5
.NoMatch Compile Error 2
After Update Question 3
Protection Assistance 2
FindFirst selecting records where a date field is >= system date 4
Syntax error 3

Top