Type mismatch error after access 2007 conversion in form call

Discussion in 'Microsoft Access' started by hedgracer, Jul 22, 2010.

  1. hedgracer

    hedgracer Guest

    I recently converted an access 2003 database to Access 2007.
    Everything has worked fine except for getting a Type Mismatch (Run
    time error '13') on "Forms!frmQueryPaymentAA.BuildSQLExisting
    'Transfers selected query name to the base form" line. I changed the
    Sub from Private to Public after reading on some forums that Private
    could cause a problem but that did not help. Is there a fix for this?
    Here is the code:

    Public Sub cmdPaymentReturn_Click()
    If IsNull(Me.lstQuery) Then
    MsgBox "You have not selected a query. Either select a query or close
    the form to construct a new query" Exit Sub
    End If

    Forms!frmQueryPaymentAA.BuildSQLExisting 'Transfers selected query
    name to the base form DoCmd.Close
    End Sub

    BTW, BuildSQLExisting is a Public sub procedure in the
    frmQueryPaymentAA form. The offending line is calling the form and
    procedure from existing form.
     
    hedgracer, Jul 22, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Achieva

    Type mismatch error via "Filter by Form"

    Achieva, Aug 12, 2003, in forum: Microsoft Access
    Replies:
    0
    Views:
    356
    Achieva
    Aug 12, 2003
  2. Guest

    access error "type mismatch in expression"

    Guest, Mar 17, 2005, in forum: Microsoft Access
    Replies:
    1
    Views:
    781
    John Vinson
    Mar 18, 2005
  3. Guest

    Access 2003 Table sort type mismatch error

    Guest, Aug 19, 2005, in forum: Microsoft Access
    Replies:
    3
    Views:
    562
  4. Jim Mc

    Run-time Error 13 "Type Mismatch" Access 2000

    Jim Mc, Sep 22, 2005, in forum: Microsoft Access
    Replies:
    5
    Views:
    852
    Allen Browne
    Sep 30, 2005
  5. Ayoa
    Replies:
    1
    Views:
    928
    Albert D.Kallal
    May 30, 2006
  6. Nitin

    Type Mismatch Error in Access Report

    Nitin, Aug 1, 2006, in forum: Microsoft Access
    Replies:
    2
    Views:
    3,126
    Nitin
    Aug 2, 2006
  7. DaveAP

    Auto Fill Form Fields Type Mismatch Error

    DaveAP, Jul 29, 2008, in forum: Microsoft Access
    Replies:
    2
    Views:
    383
    DaveAP
    Jul 30, 2008
  8. Pete
    Replies:
    5
    Views:
    5,610
    Tony Toews [MVP]
    Dec 29, 2008
Loading...