Hi,
I am trying to create labels in report header section at runtime. The number of labels vary each time. I am using code like this.
DoCmd.OpenReport "Report1", acViewDesign
Set rpt = Reports("Report1"
Set lblNew = CreateReportControl(rpt.Name, acLabel, acHeader, _, , 500, 600, 1200, 1500)
lblNew.SizeToFit
lblNew.Caption = "This Is label"
lblNew.FontSize = 15
But i get the error saying "the number you entered for report section is invalid"
istead if i use acDetail instead of acHeader it works. But then it puts the labels at each record, i want them to be displayed only once. any one knows how to do that?
I am trying to create labels in report header section at runtime. The number of labels vary each time. I am using code like this.
DoCmd.OpenReport "Report1", acViewDesign
Set rpt = Reports("Report1"
Set lblNew = CreateReportControl(rpt.Name, acLabel, acHeader, _, , 500, 600, 1200, 1500)
lblNew.SizeToFit
lblNew.Caption = "This Is label"
lblNew.FontSize = 15
But i get the error saying "the number you entered for report section is invalid"
istead if i use acDetail instead of acHeader it works. But then it puts the labels at each record, i want them to be displayed only once. any one knows how to do that?