Importing an TXT file into Access

J

Jason

I have this txt file that is jumbled up and need to import it with some
changes in.

1. need to seperate the city state zip into the table without it being
combined.
2. Need to add the file name to the table where the information is coming
from.
3. Need to use the numerical value of the data into the table. example it
might say Apple but in the lookup its a 1. Can u please help. i have an
example to work with but not sure how to approach it. If you want to see the
example please send me ur email. thank you so much
 
P

Piet Linden

I have this txt file that is jumbled up and need to import it with some
changes in.

1. need to seperate the city state zip into the table without it being
combined.
2.  Need to add the file name to the table where the information is coming
from.
3.  Need to use the numerical value of the data into the table.  example it
might say Apple but in the lookup its a 1.  Can u please help.  i have an
example to work with but not sure how to approach it.  If you want to see the
example please send me ur email. thank you so much

two options. One is to import into a temporary table that you can
query and fix your data. Then import into the final table. When you
append the data to the final table, you can update the records where
the FileName/Source is Null to the name of the current file. (If you
use the OpenFile API to get the filename, it could be stored in a
variable, which you could access via a VBA function.

Lookup tables. You can write a query to join on the actual field
value and then update another column that contains the ID for your
company name.
 

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