doyle
03-17-2010, 04:39 AM
Hi guys,
I'm in the process of importing a text file into Access. This is easy, obviously. :)
The only trouble is the data in the text file isn't in the format I would like.
The data should be a 9-digit number beginning with 21...
But the text file has it stored as a text field like this:
"QM000210000000"
The QM000 at the start is not required. I could find and replace this before importing, but I wanted to keep each process in Access, so to eliminate the steps needed.
At the moment, I import to a temporary table. The plan being, that I use some VBA to convert it, and append it to the main table.
Anyone got any pointers on how best to achieve this, and the commands that I will need to use?
My VBA knowledge isnt up to scratch, and I havent used it in a while.
Any advice would be great!
Regards
doyle
I'm in the process of importing a text file into Access. This is easy, obviously. :)
The only trouble is the data in the text file isn't in the format I would like.
The data should be a 9-digit number beginning with 21...
But the text file has it stored as a text field like this:
"QM000210000000"
The QM000 at the start is not required. I could find and replace this before importing, but I wanted to keep each process in Access, so to eliminate the steps needed.
At the moment, I import to a temporary table. The plan being, that I use some VBA to convert it, and append it to the main table.
Anyone got any pointers on how best to achieve this, and the commands that I will need to use?
My VBA knowledge isnt up to scratch, and I havent used it in a while.
Any advice would be great!
Regards
doyle