Report to auto open

M

MAD101

I have database that has reports that show people that have expired 60 days
after their start date. I would like these reports to open automatic when the
database is opened only if their is people on the reports. I there a way to
do this?
 
J

John J.

In the report's NoData event put:
cancel = true

The NoData event is triggered before the report is printed or displayed. By
setting the variable 'Cancel' to True, the report is suppressed.

In cases where you don't automatically run the report, you may want to add a
message to the user telling him there is no data to display.

John
 
M

MAD101

I'm not sure you understood my question. I have a report but I need to figure
out a way to get it auto open when the database is opened. I also need to
only open when there are people on the report.
 
J

John W. Vinson

I'm not sure you understood my question. I have a report but I need to figure
out a way to get it auto open when the database is opened. I also need to
only open when there are people on the report.

You can name a Macro "Autoexec"; it will open automatically when you open the
database. Put a step in the macro to open the report.

The Report's NoData event can handle the case when there are no records to
report as John suggests.
 

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