C
Carla B
I have a client with Win XP and Access 2002. He has
created a simple database with one table and some VB
script. When he tries to open a record set, he is getting
the following error: runtime error 13 type mismatch.
Thinking it may have become corrupt, I had the client do
a 'get external data' and import to a new database on hsi
PC and he still got the erro. So he tried the current
database and tried to create a new database on another PC
with Access 2002 and got the same errors. He then took a
database that was created in Access 97 but converted to
Access 2002 and stripped out all its data then copied the
same table and code to that database and it worked. Any
ideas? I have a copy of both databases. Below is a
copy/paste from his table and his module.
TABLE (named MyTable)
ID Text
1 Test 1
2 Test 2
Module (named MyModule)
Option Compare Database
Public Function MyFunction()
Dim dbMine As Database, _
rsMine As Recordset, _
stCrit As String
Set dbMine = CurrentDb
stCrit = "SELECT DISTINCTROW MyTable.* " & _
"FROM MyTable"
Set rsMine = dbMine.OpenRecordset(stCrit)
End Function
created a simple database with one table and some VB
script. When he tries to open a record set, he is getting
the following error: runtime error 13 type mismatch.
Thinking it may have become corrupt, I had the client do
a 'get external data' and import to a new database on hsi
PC and he still got the erro. So he tried the current
database and tried to create a new database on another PC
with Access 2002 and got the same errors. He then took a
database that was created in Access 97 but converted to
Access 2002 and stripped out all its data then copied the
same table and code to that database and it worked. Any
ideas? I have a copy of both databases. Below is a
copy/paste from his table and his module.
TABLE (named MyTable)
ID Text
1 Test 1
2 Test 2
Module (named MyModule)
Option Compare Database
Public Function MyFunction()
Dim dbMine As Database, _
rsMine As Recordset, _
stCrit As String
Set dbMine = CurrentDb
stCrit = "SELECT DISTINCTROW MyTable.* " & _
"FROM MyTable"
Set rsMine = dbMine.OpenRecordset(stCrit)
End Function