Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    May 2004
    Location
    Pardeeville, Wisconsin, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access 2007 Runtime Error 13 (2007 )

    The following code was written by a former programmer/employee using Access 2002 where it works without issue.

    Private Sub CESAList_DblClick(Cancel As Integer)
    If IsNull(CESAList.Value) = False Then
    DoCmd.RunSQL ("INSERT INTO RepDistricts ( Abrv ) SELECT DISTRICT.ABRV FROM DISTRICT WHERE cesa=" + CESAList.Value + ";")
    MyRefresh
    End If
    End Sub

    After upgrading to Office 2007 Professional Plus we are now getting “Runtime Error ‘13’: Type mismatch.

    Any help with this problem will be greatly appreciated.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access 2007 Runtime Error 13 (2007 )

    Which line causes the error?

  3. #3
    Lounger
    Join Date
    May 2004
    Location
    Pardeeville, Wisconsin, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2007 Runtime Error 13 (2007 )

    DoCmd.RunSQL ("INSERT INTO RepDistricts ( Abrv ) SELECT DISTRICT.ABRV FROM DISTRICT WHERE cesa=" + CESAList.Value + ";")

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Access 2007 Runtime Error 13 (2007 )

    Try changing the line to

    DoCmd.RunSQL "INSERT INTO RepDistricts ( Abrv ) SELECT DISTRICT.ABRV FROM DISTRICT WHERE cesa=" & CESAList

    (I did get Error 13 in Access 2002 too)

  5. #5
    Lounger
    Join Date
    May 2004
    Location
    Pardeeville, Wisconsin, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access 2007 Runtime Error 13 (2007 )

    Thanks HansV., this solved the problem. Your knowledge and willingness to help are both outstanding. This code will also help in the event we run across similar problems.

Posting Permissions

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