Code Examples

Create a New AutoReport

acCmdNewObjectAutoReport

The following code will create a new report based on the table passed to it. This is the same as using the AutoReport button.

'***************** Code Start *******************
' This code was originally written by Terry Wickenden.

Sub NewReport(strTable As String)
  DoCmd.SelectObject acTable, strTable, True
  DoCmd.RunCommand acCmdNewObjectAutoReport
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.