Can anyone point me in the right direction regarding Creating a New Instance of a Report in Access2K3?
Thanks
Printable View
Can anyone point me in the right direction regarding Creating a New Instance of a Report in Access2K3?
Thanks
I have instanced forms, not tried with reports, but it is probably the same.
You need a variable to hold the report (if it has to last longer than the form it is called from, then you need a global variable.
I used a collection to hold instances, as you can add and remove fairly easily.
You need a variable to be set to a new version of the report...
This needs to be added to the collection or global variable so a reference is held open, and the code you are running won't close the form immediately on clearing the variables in the local scope (form module).Code:set objReport = New rptReportName
If you've used classes, its like that. I haven't done it for a while because I ran out of memory when instancing the forms.
Thanks for your post. I was only able to find examples of instancing forms and I was. trying to use the Code with my Reports but I think I know what I was doing wrong.
Thanks,