Type mismatch error after access 2007 conversion in form call

H

hedgracer

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.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top