Code Examples

Add/Remove Report Header and Footer

acCmdReportHdrFtr, acCmdSave, acCmdCloseWindow

A fairly useless piece of code that adds a Report Header and Footer if they do not exist or removes them if they do. It expects the name of a report

'***************** Code Start *******************
'Code by Terry Wickenden

Sub AddRmoveRptHdrFtr(strReport as String)

  DoCmd.OpenReport strReport, acViewDesign
  DoCmd.RunCommand acCmdReportHdrFtr
  DoCmd.RunCommand acCmdSave
  DoCmd.RunCommand acCmdCloseWindow

End Sub

'****************** Code End ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.