Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Dec 2001
    Location
    Royal Oak, Michigan, USA
    Posts
    255
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Table Linker (v2000)

    I have a batch of *.CSV files that are loaded to a folder each month. I want to import the contents of these files one by one into an existing table using code. The problem is I don't know the naming convention...only that they will be in the folder and will contain a *.CSV extension. How can I get VBA to find the first *.CSV file, import it and move to the next file until all CSV files have been imported?
    Thanks,
    Dashiell

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Table Linker (v2000)

    Dim strMatch as String
    strMatch = Dir("yourpath*.csv")
    Do While strMatch <> ""
    DoCmd.Transfer ..........................
    Dir
    Loop

Posting Permissions

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