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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Achieva

    Type mismatch error via "Filter by Form"

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

    access error "type mismatch in expression"

    Guest, Mar 17, 2005, in forum: Microsoft Access
    Replies:
    1
    Views:
    420
    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:
    357
  4. Jim Mc

    Run-time Error 13 "Type Mismatch" Access 2000

    Jim Mc, Sep 22, 2005, in forum: Microsoft Access
    Replies:
    5
    Views:
    629
    Allen Browne
    Sep 30, 2005
  5. DaveAP

    Auto Fill Form Fields Type Mismatch Error

    DaveAP, Jul 29, 2008, in forum: Microsoft Access
    Replies:
    2
    Views:
    250
    DaveAP
    Jul 30, 2008
Loading...

Share This Page