A
Adam
I am trying to write some VBA code in Access 2000 to import data from a
delimited text file. In principle, this should be very simple, using
DoCmd.TransferText. However, I run into problems creating an import
specification. I would like to be able to do everything via VBA code, but I
can't find a VBA way to create the import specification in the first place:
I have only discovered how to do this manually.
My database will be created entirely in VBA code, and I don't want to let
the user play with things like the import wizard. Can I programmatically
create an import specification? Or can I programatically copy an import
specification already created in one database to another database? Or am I
going to have to use low-level file handling methods to read the external
data a line at a time?
I should point out that the external data is likely to be very simple, and I
don't need anything sophisticated for the import specification. All I really
need is a choice between tab and comma delimited and to specify whether the
first line contains field names.
Many thanks
delimited text file. In principle, this should be very simple, using
DoCmd.TransferText. However, I run into problems creating an import
specification. I would like to be able to do everything via VBA code, but I
can't find a VBA way to create the import specification in the first place:
I have only discovered how to do this manually.
My database will be created entirely in VBA code, and I don't want to let
the user play with things like the import wizard. Can I programmatically
create an import specification? Or can I programatically copy an import
specification already created in one database to another database? Or am I
going to have to use low-level file handling methods to read the external
data a line at a time?
I should point out that the external data is likely to be very simple, and I
don't need anything sophisticated for the import specification. All I really
need is a choice between tab and comma delimited and to specify whether the
first line contains field names.
Many thanks