Macro to Import TXT file and format the file

  • Thread starter Thread starter Richard
  • Start date Start date
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?
 
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?
 
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?
 
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
 
Back
Top