Report "open" code runs - header format code doesn't

T

TomM

I'm having a problem getting code in the "on Format" section of any report
header to run.

I created a simple, one table database and created a simple report based on
the table. I added the following code:

Private Sub Report_Open(Cancel As Integer)
MsgBox "open"
End Sub

Private Sub ReportHeader_Format(Cancel As Integer, FormatCount As Integer)
MsgBox "rptHdr"
End Sub

The "Report_Open" code runs, the "ReportHeader_Format" code (and code for
other headers) never does.

The database is in a trusted location.
What's up?
 
A

Allen Browne

Any you using Access 2007?

If so, you are probably opening the report in the new Report view. The
section events don't fire in this view. Try Print Preview instead.
 

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