If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Code help
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 |
#2
|
|||
|
|||
Code help
Hi,
you might try something like If myDate = Date Then DoCmd.OpenReport "MyReport", acViewNormal Else DoCmd.OpenReport "MyReport", acViewPreview End If -- Kind regards Noëlla "Richard" wrote: 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 |
#3
|
|||
|
|||
Code help
Thanks Noëlla,
I will give your suggestion a try. Richard "NG" wrote: Hi, you might try something like If myDate = Date Then DoCmd.OpenReport "MyReport", acViewNormal Else DoCmd.OpenReport "MyReport", acViewPreview End If -- Kind regards Noëlla "Richard" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|