Hi,
I have a MS access database table for which I regularly need to import
fixed width text data. At present I have to to cut and paste the text
data from its source to a text file, save the file, import the text
file as fixed width text [it is not naturally delimited], and then run
an update query to copy the appropriate info into fields of a different
table.
Is it possible to write a macro to do all these steps? Also, is it
possible to import directly from the clipboard (to skip the step of
making a text file)?
Any help provided would be greatly appreciated.
Best wishes,
George Hadley
ghadley_00@yahoo.com
Steve Schapel - 30 Dec 2005 19:37 GMT
George,
As far as I know, it is not possible to import data into your database
from the clipboard.
However, the other 2 steps can certainly be done with a macro. For
importing from the text file into your Access database, you would use a
TransferText action, and then use an OpenQuery action to move it into
the main table. For the TransferText, you would run the process
"manually" first, via the File|Get External Data menu, and in the last
screen of the Import wizard, click the 'Advanced' button to save the
setup as an Import Specification. THen nominate this in the
Specification Name argument of the TransferText action.

Signature
Steve Schapel, Microsoft Access MVP
> Hi,
>
[quoted text clipped - 15 lines]
> George Hadley
> ghadley_00@yahoo.com