Adp Reports with no records

R

Rick Flores

Hello,

Does anyone has an example of how to print another
report from the nodata event.

This is the code i currently have in the on nodata event:
MsgBox "No Data Found for Date Entered"
Cancel = True
However, the report needs to run in batch as well,
without user intervention. I tried to replace the code in
the on nodata event with:

Dim stDocName As String

stDocName = "Report_nodata"
DoCmd.OpenReport stDocName, acViewPrint
cancel=true

but when i put the report in macro and run the macro it
does not work.

please help
 
V

Vadim Rapp

RF> DoCmd.OpenReport stDocName, acViewPrint

there's no such constant as acViewPrint.

Vadim
 
V

Vadim Rapp

RF> My mistake. Should be acViewNormmal, however, it
RF> does not work.

it's not acViewNormmal either. Try acViewPreview

Vadim
 

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

Similar Threads

no data on reports 2
nodata on reports 2
Cannot trap 2501 error 5
Error 2501 4
Access Reports crash on NoData event 2
Cancel printing if NoData 2
No data event function 2
Annoying errer message 1

Top