Can't figure the eror

E

ewentms

I am trying to write some code behind a form. Here is the code

Dim dbsMyAcc As Databas
Dim rsChecking As Recordse

Set dbsMyAcc = CurrentD
Set rsChecking = dbsMyAcc.OpenRecordset("Checking", dbOpenDynaset

Debug.Print "Checking Open
rsChecking.MoveFirs
rsChecking.MoveLas

The problem is when I get to Set reChecking I get a type mismatch error and I can't figure out why. I am using Access Xp and a reference to DAO 3.6 is set

Any help appreciated

TI
Ron
 
A

Alphonse Giambrone

You probably also have a reference to ado and it is listed first among your
checked references.
If you are not using ado, then uncheck it.

Or change
Dim dbsMyAcc As Database
Dim rsChecking As Recordset

to:
Dim dbsMyAcc As DAO.Database
Dim rsChecking As DAO.Recordset


--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us


ewentms said:
I am trying to write some code behind a form. Here is the code:

Dim dbsMyAcc As Database
Dim rsChecking As Recordset

Set dbsMyAcc = CurrentDb
Set rsChecking = dbsMyAcc.OpenRecordset("Checking", dbOpenDynaset)

Debug.Print "Checking Open"
rsChecking.MoveFirst
rsChecking.MoveLast

The problem is when I get to Set reChecking I get a type mismatch error
and I can't figure out why. I am using Access Xp and a reference to DAO 3.6
is set.
 

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