Code help

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi all,

I would like to setup a command button to print reports using this criterion
if possible. If records >=Date() then print report, else DoCmd.RunCommand
acCmdPrint. If the date matches today’s date print my report other wise show
me the print dialog box.

Thanks
Richard
 
Hi,

you might try something like

If myDate = Date Then
DoCmd.OpenReport "MyReport", acViewNormal
Else
DoCmd.OpenReport "MyReport", acViewPreview
End If
 
Back
Top