|
-
Feb 27th, 2006, 03:17 PM
#1
Thread Starter
Giants World Champs!!!!
Creating New Instance
Can anyone point me in the right direction regarding Creating a New Instance of a Report in Access2K3?
Thanks
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Feb 28th, 2006, 07:43 AM
#2
Re: Creating New Instance
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...
Code:
set objReport = New rptReportName
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).
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.
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Mar 2nd, 2006, 07:30 AM
#3
Thread Starter
Giants World Champs!!!!
Re: Creating New Instance
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,
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|