Adp Reports with no records

  • Thread starter Thread starter Rick Flores
  • Start date Start date
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
 
RF> DoCmd.OpenReport stDocName, acViewPrint

there's no such constant as acViewPrint.

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

it's not acViewNormmal either. Try acViewPreview

Vadim
 
Back
Top