Results 1 to 2 of 2

Thread: Preserve array

  1. #1
    Join Date
    Oct 2003
    Posts
    311

    Unanswered: Preserve array

    I created a function to return an integer :FindSkipCKNo

    I would like to create an array to hold the values it returns my wonderful USING ACCESS book gives me no clue!

    i am trying :

    Dim MissingCks() As Integer

    MissingCks(UBound(MissingCks)) = FindSkipCKNo(frstCek, nextCek)


    this doesnt work.

    How can i create a dynamic array and add to it?
    How can i get the info from it possibly like

    for i = 0 to Ubound(myarray)
    str = str + "," & Myarray(i)
    Next

  2. #2
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Smile Re: Preserve array

    Originally posted by mikezcg
    I created a function to return an integer :FindSkipCKNo

    I would like to create an array to hold the values it returns my wonderful USING ACCESS book gives me no clue!

    i am trying :

    Dim MissingCks() As Integer

    MissingCks(UBound(MissingCks)) = FindSkipCKNo(frstCek, nextCek)


    this doesnt work.

    How can i create a dynamic array and add to it?
    How can i get the info from it possibly like

    for i = 0 to Ubound(myarray)
    str = str + "," & Myarray(i)
    Next
    After you have declared a dynamic array you will have to use the Redim statement to redimension the array as you go. If you know how many elements the array will hold or a "no more than" it would be best to set it to this value originally. Ex. Dim MissingCks(100) as Integer.

    The help system for Visual Basic that ships with Access can give you more details.

    Gregg

Posting Permissions

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