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

Reading a Text Delimited Files from A: Drive to Convert to Access Tabl

Status
Not open for further replies.

toolsofministry

Programmer
Sep 11, 2002
24
US
I have an application where many of my clients will have the name, address, phones numbers, date of birth ETC in another application. Their application will export the data to a text delimted file on a floppy.

I want them to point the fields in their text delimted file to corresponding fields in a table in my database. Once done a click of a button will automatically read all the delimted files and write them the access table.

Thanks in advance for your suggestions.

Jack Robinson
 

Does the file have header fields? If yes you can read in the first line and use those to display for the user to make a match. Once you have this done you can use the Split Function (if the lines are delimited in some way) or instr, mid, left and right. Also look up freefile and line input.

Good Luck

 
1. The first thing you should do is copy the file(s) from floppy to a hard drive (local, network, whatever.) Floppy I/O can be maddening slow, so it's best to get it over with in one fell swoop.

2. I would hope that you have a compatible version of MS Access. If so, there's no need to use VB. Open your database and go to the "File" menu. Choose "Get External Data | Import..." In the ensuing "Import" dialog, look at the bottom for the combo box labeled "Files of type:" and pull down the value for "Text Files." Use the Explorer part of the dialog to find your data file, highlight it, and hit the "Import" button.

3. Access itself will walk you through the rest of the procedure.

(Do you swear this isn't homework?)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top