Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Thanked 0 Times in 0 Posts

    how can i use an array (Access 2000)

    I have a command that copies databases from only one source to different destinations.
    I want to make an array in order to show the the source database only once?
    For the time being my command looks like that:

    FileCopy strBuSource, strBuDest
    FileCopy strBuSource, strVaDest
    FileCopy strBuSource, strBlDest
    FileCopy strBuSource, strHaDest
    FileCopy strBuSource, strPlDest
    FileCopy strBuSource, strTaDest
    FileCopy strBuSource, strTrdest

    Is it possible to write down only the destinations with one data base source?

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Indianapolis, Indiana, USA
    Thanked 0 Times in 0 Posts

    Re: how can i use an array (Access 2000)

    I'm not quite up on using Arrays, but I'll take this opportunity to help and to have others check my methods at the same time <img src=/S/smile.gif border=0 alt=smile width=15 height=15>:<pre>Dim strDest(7) as String
    Dim intCounter as Integer

    strDest(1) = "File1"
    strDest(2) = "File2"
    strDest(3) = "File3"
    strDest(4) = "File4"
    strDest(5) = "File5"
    strDest(6) = "File6"
    strDest(7) = "File7"

    For intCounter = 1 to 7
    FileCopy strBuSource, strDest(intFileCounter)

    HTH <img src=/S/thumbup.gif border=0 alt=thumbup width=15 height=15>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Sacramento, California, USA
    Thanked 1 Time in 1 Post

    Re: how can i use an array (Access 2000)

    The question I would have is how you're getting the destination filenames to populate your array in the first place. Are these a hard-coded list or do you populate it from a Dir function, or what? Also, you need the full path for the destination, not just the filename itself. So you either have to include that in the array value or concatenate it to the array value in the FileCopy command (assuming the destination files are all in the same path).

Posting Permissions

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