Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing CSV files

Status
Not open for further replies.

Steven547

Technical User
Sep 15, 2004
165
US
What would be a simple script or way to import a .csv file into access 2003? Would I just do a "import" from within or do it through VBA? And if through VBA, is there a "template" out there to follow? Sorry, I'm new to the "importing through VBA" so I'm trying to find examples to follow so I can learn this...

thanks!
 
Have a look at the DoCmd.TransfeText method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
OOps, sorry for the typo.
Have a look at the DoCmd.TransferText method.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
There are two methods - look at

Code:
docmd.transfertext

Alternatively, if you need to do anything funky with the text as it comes in look at something like

Code:
dim strLine as sring

open "Myfile.txt" for input as #1
do until #1.eof(1)
    Line Input #1, strLine
    'Do somehing with strLine
loop

Hope this helps, JB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top