[VBA][Access] Open reports to view using buttons.
How can I open reports in the report viewer using abutton.
This prints the form. I want to open it.
Code:
Private Sub cmdOpenSummary_Click()
DoCmd.OpenReport ("rptSummary")
End Sub
Thanks
[edit] Ah bugger, wrong forum, could someone move this to the database forum please.[/edit]
Re: [VBA][Access] Open reports to view using buttons.
If this is a VBA question then I'd think that the Office Development forum would be the appropriate place.
Re: [VBA][Access] Open reports to view using buttons.
Re: [VBA][Access] Open reports to view using buttons.
Depending on if your doing this from within Access or from VB 6/ VB.NET
Print is the default action when no parameter is specified
VB Code:
Private Sub cmdOpenSummary_Click()
DoCmd.OpenReport "rptSummary", acViewPreview, , , acWindowNormal
End Sub