Hmm.. I have a command button on a form have the following code: "DoCmd.
OpenReport "Hazards"". When I press the button, instead of Opening the
report, it prints it! I'm confused... any ideas?
HowardChr - 30 Apr 2007 15:35 GMT
Nevermind, I forgot the ending. Should have shown: DoCmd.OpenReport
"hazards", acPreview
>Hmm.. I have a command button on a form have the following code: "DoCmd.
>OpenReport "Hazards"". When I press the button, instead of Opening the
>report, it prints it! I'm confused... any ideas?
Marshall Barton - 30 Apr 2007 15:56 GMT
>Hmm.. I have a command button on a form have the following code: "DoCmd.
>OpenReport "Hazards"". When I press the button, instead of Opening the
>report, it prints it! I'm confused... any ideas?
If you want to preview a report, then you need to specify
it.
DoCmd.OpenReport "Hazards", acViewPreview

Signature
Marsh
MVP [MS Access]