Can't figure the eror

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
 
Back
Top