?
Solved

Accessing Text File from a VBA module of MS Access

Posted on 1997-05-26
1
Medium Priority
?
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 1

Accepted Solution

by:
jimlam earned 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

pc, laptop  monitor connection configurations
Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

765 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