Importing txt file to table

G

Guest

Hi

I want to automate the importation of data from txt. files to 2 seperate
tabels.

I have a 2 txt files called Consumtion and Consumption1. I want a button on
my form that when activated should import Consumtion to tbl_consumtion and
thereafter append Consumtion1 to the same table. How can this be done?

regards
Ticotion
 
A

Allen Browne

Use a macro with the TransferText action to import the text files.
This assumes they are in a suitable format (e.g. fixed width or
comma-separated-values.)

In practice, there's usually quite a bit more work to do to ensure good
imports, e.g.:
- to ensure the same file is not imported multiple times
- to ensure the incoming data does not violate indexes, validation rules,
required fields, etc.
- to get Access to understand formatted data correctly (dates, currency,
percents, ...)
- to assign the flat-file data into the right relational tables (lookups,
line items in related tables)
and so on.
 

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