type mismatch error

  • Thread starter Thread starter Moy
  • Start date Start date
M

Moy

Hello. I need help from anyone. This is a simple code that
was working fine with Access 2000. Now is giving me
problems wid Access Xp. "Type mismatch" is the error, this
is the only DB open and the table is within the DB.

Dim MyTabla As Database
Dim AAA As Recordset

Set MyTabla = CurrentDb
Set AAA = MyTabla.OpenRecordset("Test", dbOpenTable)'Rem
(here I try all types available even excluding type)
With AAA
.MoveFirst
End With

Make = Forms!CarInfo!Make
Model = Forms!CarInfo!Model

AAA.Close
Thanks in advance.
 
The code appears to use DAO. Do you have a Reference set to DAO? Also, try

Dim MyTabla As DAO.Database
Dim AAA As DAO.Recordset

If this causes a compile error, then you probably don't have the reference set.
 
Back
Top