Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    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
    Exit Sub
    End If
    Rem tblVcherCtr.Index = "PrimaryKey"

    On Error GoTo LoadError

    wsp.BeginTrans ' begin transaction processing of spreadsheet import
    LoadFail = True

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts