Automate importing of text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi guys
Trying to import a txt file that comes out like this:

19:57 The Meadows Race 1
No. Dog Price
1 Fido 3.50
2 Brutus 21.50
3 Smokin fast 16.00
19:57 The Meadows Race 2
No. Dog Price
1 Fido1 3.50
2 Brutus1 21.50
3 Smokin fast1 16.00



and convert like this:

The Meadows 1 1 Fido1 3.50
The Meadows 1 2 Brutus1 21.50
The Meadows 1 3 Smokin fast 16.00
and so....

in otherwords put the header of each dog race into a column field.
I can do it excel with about 2000 lines of if statements but can i do it in
access easier as i need to automate it as i have todo thousands of them.
 
I just automated an import from a csv file. If the fields are in the same
order you should be able to pick each item up.
 
MArk said:
Hi guys
Trying to import a txt file that comes out like this:

19:57 The Meadows Race 1
No. Dog Price
1 Fido 3.50
2 Brutus 21.50
3 Smokin fast 16.00
19:57 The Meadows Race 2
No. Dog Price
1 Fido1 3.50
2 Brutus1 21.50
3 Smokin fast1 16.00



and convert like this:

The Meadows 1 1 Fido1 3.50
The Meadows 1 2 Brutus1 21.50
The Meadows 1 3 Smokin fast 16.00
and so....

in otherwords put the header of each dog race into a column field.
I can do it excel with about 2000 lines of if statements but can i do it in
access easier as i need to automate it as i have todo thousands of them.
You need to write code to do this. look at the INPUT statement or you
can import the data into a temp table and then process it with a Do Loop
or Do While.

Ron
 
Back
Top