Solved

Accessing Text File from a VBA module of MS Access

Posted on 1997-05-26
1
205 Views
Last Modified: 2010-04-12
I need to load some data into Access database which is in a text format, and I wanted to write a VBA module which will parse the text file and store the data into the database.  But I can't figure out how to access a text file from a VBA module.  Any help would very much be appreciated
0
Comment
Question by:karim
1 Comment
 
LVL 1

Accepted Solution

by:
jimlam earned 50 total points
ID: 1009166
Hi Karim,

You need to use the OPEN statement to open a file like:

OPEN "ABC.TXT"" For Input As #1

Then use INPUT, LINE INPUT or other functions to get the text in, use the EOF function to check for end-of-file. And lastly, use CLOSE to close the text file.

Good luck,
Jim
0

Featured Post

Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

Join & Write a Comment

This is about my first experience with programming Arduino.
This video discusses moving either the default database or any database to a new volume.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now