Access2007 won't run report event procedures (e.g. Detail Format)

  • Thread starter Thread starter S64Byt
  • Start date Start date
S

S64Byt

Program control never calls the event procedures. Here are the only event
procedures that run from the code listed below:
-----
Report Open
Report Load
Report Activate
Report Got Focus
Detail Paint
....
Detail Paint
Report Unload
Report Lost Focus
Report Deactivate
Report Close
-----
(Note: the 'End Sub' lines have been removed for posting)
Option Compare Database
Option Explicit

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Debug.Print "Detail Format"

Private Sub Detail_Paint()
Debug.Print "Detail Paint"

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Debug.Print "Detail Print"

Private Sub Detail_Retreat()
Debug.Print "Detail Retreat"

Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As
Integer)
Debug.Print "Page Header Format"

Private Sub Report_Activate()
Debug.Print "Report Activate"

Private Sub Report_Close()
Debug.Print "Report Close"

Private Sub Report_Current()
Debug.Print "Report Current"

Private Sub Report_Deactivate()
Debug.Print "Report Deactivate"

Private Sub Report_GotFocus()
Debug.Print "Report Got Focus"

Private Sub Report_Load()
Debug.Print "Report Load"

Private Sub Report_LostFocus()
Debug.Print "Report Lost Focus"

Private Sub Report_Open(Cancel As Integer)
Debug.Print "Report Open"

Private Sub Report_Page()
Debug.Print "Report Page"

Private Sub Report_Unload(Cancel As Integer)
Debug.Print "Report Unload"
 
If you open the report in Layout or Report view, the section events won't
run. They do run in Normal and Print Preview.

If the report's Open event doesn't even run, perhaps it's something like
this:
a) You don't have the database in a trusted location.
b) You don't have the event property set.
c) You need to decompile.

Post back if you need details.
 
Thank you. 'Print Review' worked. Now I can't help but wonder what the
'Report View' is good for and why it is the default view, since it doesn't
properly display the intended results.
------------
 
Back
Top