Results 1 to 3 of 3

Thread: Creating New Instance

  1. #1

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    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."


  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    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.

    BOFH Now, BOFH Past, Information on duplicates

    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...

  3. #3

    Thread Starter
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    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
  •  



Click Here to Expand Forum to Full Width