K
kylenix
I programmatically created a report by using CreateReport()
But when I tried to add a label control to the report header, errors
occured.
Dim rpt As Access.Report
Dim lbl As Access.Label
Set rpt = CreateReport
Set lbl = CreateReportControl(rpt.Name, acLabel, acHeader)
Run-time error '2148':
the number you used to refer to the form or report section is invalid.
When I changed acHeader to acPageHeader, everything is fine.
It seems to me that the report header is not enabled when the report is
created by CreateReport() call.
Is there any way to dynamically create a report with report header?
Thanks
But when I tried to add a label control to the report header, errors
occured.
Dim rpt As Access.Report
Dim lbl As Access.Label
Set rpt = CreateReport
Set lbl = CreateReportControl(rpt.Name, acLabel, acHeader)
Run-time error '2148':
the number you used to refer to the form or report section is invalid.
When I changed acHeader to acPageHeader, everything is fine.
It seems to me that the report header is not enabled when the report is
created by CreateReport() call.
Is there any way to dynamically create a report with report header?
Thanks