Solved

Accessing Text File from a VBA module of MS Access

Posted on 1997-05-26
1
206 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

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Rasberry PI is a low cost piece of hardware that you can have a lot of fun with through experimenting and building/working on projects like media players, running a low cost computer, build data loggers etc. - see: https://www.raspberrypi.org
Monitor input from a computer is usually nothing special.  In this instance it prevented anyone from using the computer.  This was a preconfiguration that didn't work.
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

15 Experts available now in Live!

Get 1:1 Help Now