Import a CSV file into an Access 2007 table
-
Tuesday, July 13, 2010 3:34 PM
How do I import a CSV file into an Access 2007 table using VBA ?
- Edited by Gazza101 Friday, September 28, 2012 9:59 AM
All Replies
-
Tuesday, July 13, 2010 5:57 PM
If you are using a standard csv file and its always coming in the same way, I would first create an import specification by importing it normally and saving the spec
then do something like this
DoCmd.TransferText acImportDelim, "AdsDump Import Specification", "ADSDump", "C:\adsDump.txt"
Thats what I have in one of mine. .txt should be the same as .csv I believe, the spec will tell it that is a comma delimited file.
- Marked As Answer by Gazza101 Monday, July 19, 2010 4:29 PM
-
Wednesday, July 14, 2010 6:55 AM
I believe, Pyronik's solution works well.. as I do follow the same procedure and more ove the same parameter like ACIMPORTDELIM, similar keywords are used to improt even excel files or files from other databases and others.
regards
Repath athyala. -
Monday, July 19, 2010 4:29 PMCheers Guys
-
Wednesday, April 04, 2012 3:33 PM
could you help me out....I am very new to vba and am trying to this same thing. I guess I need to be told as if I'm a kindergartner????
I have 4 files that need to be appended to a master table, all in same folder:
c:\AprilData\April.accdb --there is a table in here called 'MasterTable' with same columns as each file
c:\AprilData\North.csv
c:\AprilData\South.csv
c:\AprilData\Central.csv
c:\AprilData\West.csv
What are the steps that are taken to make the docmnd work?
I've made macros but that's about it. I can open the vba viewer, but I don't know where to put stuff.

