User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 402,981 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,668 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS Access and FileMaker Pro advertiser: Programming Forums
Views: 523 | Replies: 0
Reply
Join Date: Nov 2007
Posts: 1
Reputation: snowmman99 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
snowmman99 snowmman99 is offline Offline
Newbie Poster

Import several files to MS ACCESS

  #1  
Jul 17th, 2008
I am trying to import several files to access. I have the code to search the C:\ drive but I need to look thru all the folders also. Below is what I have so far the works. Thanks in advance for any help. Wayne
Dim strfile1 As String
Dim strfile2 As String
Dim strmsg As String
strmsg = "All Incoming files have been Successfully Imported and Deleted!"
ChDir ("C:\")
strfile1 = Dir("*.sta")
strfile2 = "status.txt"
Do While Len(strfile1) > 0
FileCopy strfile1, strfile2
DoCmd.TransferText acImportFixed, "Specifiation", "tblName", strfile2, False
Kill "C:\" & strfile1
Kill "C:\" & strfile2
strfile1 = Dir
Loop
MsgBox (strmsg)
Last edited by Tekmaven : Jul 17th, 2008 at 12:36 pm. Reason: Code tags
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS Access and FileMaker Pro Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS Access and FileMaker Pro Forum

All times are GMT -4. The time now is 8:23 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC