onNoData issue

R

Rockn

I have a report based on a group of sales people and a sales manager.

The sales manager does not always sell product each month, but she does get
commissions based on what the other people in the office sell. I have two
reports set up to run seperately and they both return the correct info. I
would like them to print one after the other in preview mode and also be
able to use the onNoData for each report if there is no records in the
report.

The issue comes in if I use it and then cancel = true it will not open the
next report because it is outside of the original procedure.

It is something like this:

If Me.Combo.4(1) = 0 Then

'tests to see if the user is a manager runs through all criteria for report
based on combo boxes and if not a manager only prints the one report

DoCmd.OpenReport1 ...........

Else

'is a manager, runs through all criterial from the form and since they are a
manager prints two reports

DoCmd.OpenReport1......... 'If this report has no data I still need it to
run the following report.

DoCmd.OpenReport2......... 'If this report has no data no big deal


End If


I am sure it is simple, but at this point I can't see the forest for the
trees.

Thanks!
 
K

Klatuu

Turn off error handling:

On Error Resume Next
Docmd.OpenReport "Report1"
Docmd.OpenReport "Report"

Then turn it back on afterwords
 
K

Klatuu

To qoute a dear departed friend from about 1964
"Anything is easy if you know how"
 

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