neeeeeed help

shrndegruv

Registered User.
Local time
Today, 10:15
Joined
Sep 8, 2004
Messages
58
Hi all

Im using OpenReport to open a report based on a table, not a query. This report is not opened from a form or anything, just straight up by clicking on the form in the Reports section. I hope OpenReport is appropriate.

Code:
Private Sub Report_Open(Cancel As Integer)
    DoCmd.OpenReport "Student Activities Organization Contact List", , , Active = True
End Sub

now when I click on the report, it doesnt even open....
 
shrn,

When you click on the report in the database window, the report will open.
It will print the report for the report's RecordSource (you said a table in
this instance).

However, when you put the code in the Open event of the report guess
what happens!

The report opens ...
In its OnOpen event it opens itself ...
The report opens again ...
In its OnOpen event it opens itself ...

Infinite recursion ... not good.

What message do you get when you run out of stack space?

The DoCmd.OpenReport line that you have is if you want to open your
report from a form. Don't need it WITHIN the report.

Wayne
 
Use wizard button to preview report

You can use the wizard button to help you open report, just follow the instruction
 

Users who are viewing this thread

Back
Top Bottom