Code help

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
 
N

NG

Hi,

you might try something like

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

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