Import text file to access database via Excel VBA.

D

Dan

Is it possible to import a text file into an access database via Excel.
The Access Table that the file should be imported already exist - it just
should be emptied of data and populated by the new data from the text file.
Thank you.
Dan
 
A

Alex Dybenko

Hi,
yes, you can, you open text file using Open # statement, then read lines
using line input# and add records to access table.
If Access installed - then you can also create new instance of access using
createobject("Access.Application") and then run docmd.transfertext method,
like you do in access

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top