Jose:
You do this by creating an Import/Export specification to use in your
Transfer Text method call. Creating these is most easily done manually by
going to the File -> Get External Data -> Import option from the menus and
starting an import from your target file. When you get to the dialog that
allows you to set delimiters, choose the Advanced option and in that dialog
you can specify just about anything including delimiter and most importantly
you are given an option to save the specification. Save it under any name
you choose and then when you call Transfer Text, specify the name of the
Import Specification you just designed.
--
Steve Arbaugh
ACG Soft
http://ourworld.compuserve.com/homepages/attac-cg
"Jose I. Avila" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> All,
>
> I have a vb script that imports every file in a directory. The problem is
> that the files are pipe(vertical bar) "|" delimited. I need to know how
to
> tell the docmd.transfertext line to use a "|".
>
> Can anyone help me?
>
> Thank you in advance for your help.
>
> ========================
> Sub Import_Allura_Tbls()
> Dim fs, FullPath,FC
> Dim FileName As String ' file name
> Dim TableName As String ' table name = file name without the .txt
> Dim i As Integer
>
>
> ' Define text file
> Set fs = CreateObject("Scripting.FileSystemObject")
> FullPath = "Y:\data\Allura\u\staff\bin\Data\txt_data_files" ' 50+ text
> files reside here.
> Set Fol = fs.GetFolder(FullPath)
> Set FC = Fol.Files
> For Each fi In FC ' files in Files collection
> FileName = fi ' fullpath & fi.ShortName
> i = InStr(1, fi.Name, ".")
> TableName = Left(fi.Name, i - 1)
> '
> DoCmd.TransferText acImportDelim, , "dbo_" & TableName, FileName
> '<=== need help here
> Next
>
> End Sub
>
>