Macro to Import TXT file and format the file

R

Richard

Hi all,

1. I have to import a delimited text file without field names.
2. then update the data in the existing Table without changing the existing
field names. can you help me do this with a macro?
 
K

Ken Snell \(MVP\)

Please provide more specific information about what you need to do. By
"update", are you wanting to edit data that are in the original table, using
values form the imported file? Or do you want to add the data from the text
file to the original table?
 
R

Richard

edit data that are in the original table, using
values form the imported file
--
Thank you for your help
Richard



Ken Snell (MVP) said:
Please provide more specific information about what you need to do. By
"update", are you wanting to edit data that are in the original table, using
values form the imported file? Or do you want to add the data from the text
file to the original table?
 
K

Ken Snell \(MVP\)

Create an update query that will update the desired fields in your permanent
table, using the data from the imported file (which you'll need to import
into a separate table).

Create a delete query that will delete all records from the separate table
into which you'll be importing the text file's data.

Then your macro actions would be
OpenQuery (to run the delete query)
TransferText (to import the text file's data to the separate table)
OpenQuery (to run the update query)

--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


Richard said:
edit data that are in the original table, using
values form the imported file
 

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