Problem OpenRecordset

E

Eef Houniet

The line:

Set rst = CurrentDb.OpenRecordset(stDocName)

does NOT work in a DB built as "new".
In that case I get (in Dutch) the errormessage:

"Fout 13 tijdens de uitvoering"
"Typen komen niet met elkaar overeen"

Translated something like:
"Error 13 during operation"
"Types are not the same"

However, if a DB has been made via a wizard, there is no problem.

I do not know what types are ment and also not why it DOES work in the one
database and NOT in the other.
I use Access 2000

Eef
 
A

Allen Browne

From the Code window, go to the Tools menu, and choose References.

Make sure you have a reference to:
Microsoft DAO 3.6 Library

At the top of your procedure, where you declare your variables, be specific
about which Recordset variable you want, i.e.:
Dim rst As DAO.Recordset
The ADO library also has a Recordset type, so if you are not specific about
which one you want, the type may not match.

More information about references:
http://allenbrowne.com/ser-38.html
 
E

Eef Houniet

Problem solved
Thank you

Eef

Allen Browne said:
From the Code window, go to the Tools menu, and choose References.

Make sure you have a reference to:
Microsoft DAO 3.6 Library

At the top of your procedure, where you declare your variables, be specific
about which Recordset variable you want, i.e.:
Dim rst As DAO.Recordset
The ADO library also has a Recordset type, so if you are not specific about
which one you want, the type may not match.

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

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