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
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
Puts the command DoCmd.Restore into the Close property of the report which errors when the report closes.
1) I cannot determine the code to create a Page Footer
Code:
Set TextBox = CreateReportControl(strDynamicFinalReport, acTextBox, acFooter, , strFieldNM, intFieldPos, intFieldLine, intFieldRptWidth, intFieldHeight)
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"