Importing txt file to table

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top