help writing import macro in access

Results 1 to 3 of 3

Thread: help writing import macro in access

  1. #1
    Jason Guest

    Default help writing import macro in access

    Hi,<BR><BR>Im tying to import many .csv text files into my access 2000 db. All of the files are located in the same directory and are named 1.csv, 2.csv, 3.csv, etc.. I have written a macro in Excel that does the same thing but I cant figure it out here. In Excel, I just created a sheet that contained the path for each file, and then ran a loop. Any help would be great!!<BR><BR>Thanks<BR>Jason

  2. #2 Guest

    Default What are you doing it in, ASP or VBA?

    In vba it would look like this:<BR><BR>for each fname in ("1.csv", "2.csv", "3.csv")<BR>DoCmd.TransferText acImportDelim,,"YourTaBle",Fname,True<BR>Next<BR>< BR>You should do some research yourself in Access Help for the TransferText params. <BR><BR>You are a bit vague about what you want. So I was not sure how to answer you.

  3. #3
    Jason Guest

    Default RE: What are you doing it in, ASP or VBA?

    wow, i hadnt even thought of doing it with ASP. I think that would be the best bet. How would I insert the contents though of each text file? Each text file contains the same type of data and only varies by the number of rows. I guess the question is how to open and retrieve the valus from the files. I can handle the inertion into the db.<BR><BR>Jason

Posting Permissions

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