Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OnOpen Expression Error

Status
Not open for further replies.

sabloomer

Technical User
Aug 8, 2003
153
US
Can anyone help? When I open some reports (Access 2003 SP 2 - File Access 2000 ADP format) I get an error "The expression On Open you entered as the event property setting produced the following error. *The expression may not result in the name of a macro, the name of a user defined function, or [Event Procedure] *There may have been an error evaluating the function, event or macro"

The code on the report is as follows..

Private Sub Report_Close()
DoCmd.Restore
End Sub

Private Sub Report_NoData(Cancel As Integer)
MsgBox "There is no data for the criteria you have selected. Please try a different criteria.", vbCritical, "Sorry"
Cancel = True
End Sub

Private Sub Report_Open(Cancel As Integer)
DoCmd.Maximize
Me.lbl_header.Caption = Form_frm_criteria_inventory.txt_header
End Sub

I have multiple reports with the same code that work, but I can't figure out why it the same reports that cause this error. I have tried to comment out all of the code on the Open event, and it still produces the same error.

Thank you for anyone that can help,

sabloomer

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top