DoCmd.OpenReport Error

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

alvarjo9 via AccessMonster.com

Hi ,
Please kindly assist.
Every time I try to click the OK butto to open the report that I have created
It passes an error of

Run time error 2585, action cannot be carried out while processing a form or
report or event.

Below is the coding. in the Ok event procedure.
Private Sub cmdOK_Click()
Me.Visible = False
'DoCmd.OpenQuery "LicenseQueryB", acViewNormal, acEdit
DoCmd.OpenReport "Torrens Valley Firearms Report B", acViewNormal, acEdit
'DoCmd.Close acForm, "License DialogB"
End Sub

Below is the coding for opening the Report which is called by a form.
Private Sub Report_Open(Cancel As Integer)
' Set public variable to true to indicate that the report
' is in the Open event
bInReportOpenEvent = True

' Open Sales By Category Dialog
DoCmd.OpenForm "License DialogB", , , , , acDialog

' Cancel Report if User Clicked the Cancel Button
If IsLoaded("License DialogB") = False Then Cancel = True

' Set public variable to false to indicate that the
' Open event is completed
bInReportOpenEvent = False
End Sub
 

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