I'm getting an error message, "You have canceled the previous operation" (Error 2001) whenever I try to open a report via "Main Menu" that was created by Helen Feddema.
I tested the query and the report via Access window and it runs properly but gives the Error 2001 message when I try to run it via Main Menu and I am not sure why it refuses to run properly when trying to open it via Main Menu add-in but I can open other two reports with similiar set up just fine?
Code for the OnClick property is attached, let me know if I need to supply more information.
Private Sub cmdReports_Click()
'Created by Helen Feddema 9-2-2003
'Last modified 9-2-2003
On Error GoTo ErrorHandler
Dim strReportName As String
Dim strRecordSource As String
If Nz(Me![cboReports]) <> "" Then
strReportName = Me![cboReports]
strRecordSource = Me![cboReports].Column(2)
If Nz(DCount("*", strRecordSource)) > 0 Then
If Me![fraReportMode] = 1 Then
DoCmd.OpenReport ReportName:=strReportName, view:=acPreview
Me.Visible = False
ElseIf Me![fraReportMode] = 2 Then
DoCmd.OpenReport ReportName:=strReportName, view:=acNormal
MsgBox "No records for this report"
MsgBox "Error No: " & Err.Number & "; Description: " & _