This message is the result of clicking an Open Report button and gives no clue what the problem is.
"The On Open event produced the follow error:
The expression may not result in the name of a macro, funtion or event procedure.
I'll save you the gory details, but I have to comment out the code in On Open and On Format before the report will open. I also get a less fatal error with the on load event, but the report still opens. Of course commenting that out eliminate all the errors except I lose functionality in the report.
Here's the catch. This report usually opens without a hitch. Once or twice a week this problem crops up and is always cured by doing a compact and repair. Today this is not fixing the problem. What's more this does not happen on my coworker's computer.
I can probably hack my way through this, but I'm concerned about the underlying problem. Oh yeah, here the "offending" code. It's pretty tame stuff
Code:
Private Sub GroupHeader1_Format(Cancel As Integer, FormatCount As Integer)
If Me.Submission_Type_ID = 7 Or Submission_Type_ID = 8 Then
Me.txtStatus_Date.Visible = False
Me.txtStatus_Type.Visible = False
Else
Me.txtStatus_Date.Visible = True
Me.txtStatus_Type.Visible = True
End If
End Sub
Private Sub Report_Load()
If IsNull(Form_frmReports.cboCompany) Then
Me.Filter = ""
Else
Me.Filter = "Company_ID = " & Form_frmReports.cboCompany
Me.FilterOn = True
End If
End Sub
Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
End Sub