Results 1 to 2 of 2
2005-03-30, 11:13 #1
- Join Date
- Jan 2001
- Thanked 0 Times in 0 Posts
Debug error message (access 2000)
I recently upgrade a db from 97 to 2000. When I tried to run this I got a debug error. Runtime error 13. Data type mismatch. Any resain why this happened. Thanks....
If Program = "Calls" Then
Set tblVcherCtr = dbv.OpenRecordset("Call#")
ElseIf Program = "Email" Then
Set tblVcherCtr = dbv.OpenRecordset("Email#")
Else ' if neither, something ain't right so exit
Rem tblVcherCtr.Index = "PrimaryKey"
On Error GoTo LoadError
wsp.BeginTrans ' begin transaction processing of spreadsheet import
LoadFail = True
2005-03-30, 11:20 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Debug error message (access 2000)
In Access 97, the default data object model was DAO (Data Access Objects). Although this is still available in Access 2000, the default data object model there is ADO (ActiveX Data Objects). Both objects have a Recordset object, but they have different properties, methods etc.
Do the following:
- Select Tools | References... in the Visual Basic Editor
- Make sure that Microsoft DAO 3.6 Object Library is ticked.
- Note: there should be no ticked reference to a DAO compatibility library.
- Click OK.
- Make the declarations of DAO objects explicit, for example (using the variables from the code you posted)
Dim wsp AS DAO.Workspace
Dim dbv As DAO.Database
Dim tblVcherCtr As DAO.Recordset