I am haveing to create a report from scratch in VBA. Yes I know its not the easiet or effective way to do it but for this task it is what I have to do.
The issue I am having is getting the report header to show so I may access it.
The best I can gather form hours of searching is that this code should make the report header visible.
Reports("IA Completion Report").Section(acHeader).Visible = True
I get the error:
Run-time error '2462':
The section number you entered is invalid.
I have tried numerous combinations of this code with variable and replacing acHeader with 1 and still have the same error.
Now if i create the report and then rightclick and select the report header/footer the code will work fine but I would like to be able to do this from the code.
Help?
Thanks,
Justin
The issue I am having is getting the report header to show so I may access it.
The best I can gather form hours of searching is that this code should make the report header visible.
Reports("IA Completion Report").Section(acHeader).Visible = True
I get the error:
Run-time error '2462':
The section number you entered is invalid.
I have tried numerous combinations of this code with variable and replacing acHeader with 1 and still have the same error.
Now if i create the report and then rightclick and select the report header/footer the code will work fine but I would like to be able to do this from the code.
Help?
Thanks,
Justin