Type mismatch error - Please Help

C

Chris

Hello: I'm receiving a type mismatch error when using the
open recordset method from Access XP. My code line looks
like this:

set rsDateInfo = currentdb.openrecordset(strsql)

I have dimensioned strsql as string and populated it with
a valid sql statement.

I have been working primarily with office 97 and just
recently started working with XP. The above works in 97.
What am I missing here?
 
A

Allen Browne

The ADO and DAO libraries both have a Recordset object.
Be explicit about which one you mean:
Dim rsDateInfo As DAO.Recordset

If that still doesn't work, choose References from the Tools menu, and check
the box beside:
Microsoft DAO 3.6 Library.

More information:
http://allenbrowne.com/ser-38.html
 
T

Treebeard

Chris said:
Hello: I'm receiving a type mismatch error when using the
open recordset method from Access XP. My code line looks
like this:

set rsDateInfo = currentdb.openrecordset(strsql)

I have dimensioned strsql as string and populated it with
a valid sql statement.

I have been working primarily with office 97 and just
recently started working with XP. The above works in 97.
What am I missing here?

Make sure your References are correct. Check that in "Tools/References" you
have the exact libraries that you had in 97.

i.e. "Microsoft DAO 3.6 Object Library " ,, etc.
 

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


Top