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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing text files 1

Status
Not open for further replies.

roamer762

MIS
Aug 16, 2002
26
MT
Hello,
I have a text directory into which a number of text files is imported daily. The files name vary from day to day.Is it possible to import all file by coding because as far as I know in the transfertext method you have to name the file .For me this is impossible as file name is not the same...however the directory into which they are saved is always the same (C:/temp/text)


Please help!!
 
Hi

USe the DIR() function to return the file names on by one, roughly like so:

Dim strFilename as String

strFileName = Dir("C:/temp/text\*.*")
Do Until strFileName
doCmd.TransferTExt, ...etc
Dir
Loop

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top