Hi,
I need to import a text file using VBA in Access 2000.
I want the text file to be imported into a table when the user opens a form.
Has anyone any suggestions of how to go about this??
Thanks in advance for any help.
Gill
Printable View
Hi,
I need to import a text file using VBA in Access 2000.
I want the text file to be imported into a table when the user opens a form.
Has anyone any suggestions of how to go about this??
Thanks in advance for any help.
Gill
1. If you need to import a single file then do it manually by going to File
> Get External Data > Import, select Text file type, point to your file and
follow instructions on "Import Text Wizard" dialog.
2. If you are planning to do this task multiple times then follow step 1 and
when you see "Import Text Wizard" dialog click "Advanced..." button, follow
instruction, give your new Specification a name and save it.
3. Your call to that spec may look something like this:
DoCmd.TransferText acImportFixed, "Summary_Spec", SourceTableName,
SourceFile
If it is not clear I may suggest you read help on TransferText method.
Regards,
Roy
"Gill" <Maloneygillian@hotmail.com> wrote in message
news:3bab426b@news.devx.com...
>
> Hi,
> I need to import a text file using VBA in Access 2000.
> I want the text file to be imported into a table when the user opens a
form.
>
>
> Has anyone any suggestions of how to go about this??
>
> Thanks in advance for any help.
>
> Gill