How to link many csv file to Access97

E

ecc28

I would like to like many csv file to Access as standalone
table OR import them as standalone table. Please advise.

Also how to use the following script for importing?
Please help.

Private Sub btnImportAllFiles_Click()
'procedure to import all files in a directory and delete
them.
'assumes they are all the correct format for an ASCII
delimited import.
Dim strfile As String
Dim strFileName As String
Dim strTable As String


ChDir ("C:\")
strfile = Dir("FileName*.*")
Do While Len(strfile) > 0
DoCmd.TransferText acImportDelim, strFileName,
strTable, "c:\test" & strfile, True
'delete the file (consider moving it to an Archive
folder instead.)
Kill "c:\test\" & strfile
strfile = Dir
Loop

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top