Issues Creating an Access Report Programmatically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rmurgia
    New Member
    • May 2008
    • 63

    Issues Creating an Access Report Programmatically

    I am trying to create an Access report programmaticall y. So far I have been able to accomplish everything except the following:

    1) I cannot determine the code to create a Page Footer
    Code:
    Set TextBox = CreateReportControl(strDynamicFinalReport, acTextBox, acFooter, , strFieldNM, intFieldPos, intFieldLine, intFieldRptWidth, intFieldHeight)
    Gave the following Error:
    Error Number: 2148 The number you used to refer to the form or report section is invalid

    2) I cannot determine the code to create code for the On Close Event
    Code:
    Reports(strDynamicFinalReport).OnClose = "DoCmd.Restore"
    Puts the command DoCmd.Restore into the Close property of the report which errors when the report closes.
Working...