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.
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.