Multiple Action Queries Currentdb.execute

  • Thread starter accessuser via AccessMonster.com
  • Start date
A

accessuser via AccessMonster.com

is there anything wrong with my following VBA code? If I take off the last
two queries, then it works by opening the form. But I can't open the form
with those two queries on my code. Any suggestions???

Private Sub CmdMatch_Click()
On Error GoTo Err_CmdMatch_Click

CurrentDb.Execute "QryDeleteBlankLedger", dbFailOnError
CurrentDb.Execute "QryDeleteBlankBank", dbFailOnError
CurrentDb.Execute "QryUpdateUnmatched", dbFailOnError
CurrentDb.Execute "QryUpdateMatched", dbFailOnError
CurrentDb.Execute "QryBankWithoutMatchingLedger", dbFailOnError
CurrentDb.Execute "QryledgerWithoutMatchingLedger", dbFailOnError

DoCmd.OpenForm "FrmReconciliation", acNormal
DoCmd.Close acForm, Me.Name

End_CmdMatch_Click:
Exit Sub

Err_CmdMatch_Click:

Resume End_CmdMatch_Click
End Sub


Thanks.
 
A

accessuser via AccessMonster.com

I found my problem after i posted this question. I had the wrong qry name.
 

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