Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48

    Unanswered: Preserve data in array

    Hi:

    I am using an array to populate a list box. The record source type is a function DocStatus. DocStatus populates the array and then fills the list box. All of this works fine.

    My problem is that I need the data in the array for other things. However, the array is cleared out when DocStatus completes. How do I prevent the array from clearing?

    The array is available to all procedures and I am using Redim Preserve to add additional elements.
    Cheers,
    Ken

  2. #2
    Join Date
    Jan 2004
    Posts
    24

    Copy the array

    Try copying the contents of the array to another array within the DocStatus function, then refer to the other array whenever you need to access the data outside of DocStatus

  3. #3
    Join Date
    Nov 2003
    Posts
    1,487
    Post the function code....It may be easier the pass the Array you want to use to the function and have it returned intact.

  4. #4
    Join Date
    Nov 2002
    Location
    Wyoming
    Posts
    48
    This turned out to be programmer error. I was pointing to the wrong element. Access was just doing what I told it to do.
    Cheers,
    Ken

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •