Private Sub cmdAddHeadersFooters_Click() 'Open rptAny in Design view DoCmd.OpenReport "rptAny", acViewDesign 'Add a report header and footer DoCmd.RunCommand acCmdReportHdrFtr 'Add a page header and footer DoCmd.RunCommand acCmdPageHdrFtr End Sub