Re: Importing multiple files..



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Can you put a breakpoint after the line:

strImportFile = Dir(strInputDir & "\*" & strFileExt)

to see if the string strImportFile is correctly formatted? Try running
it in a Command window to see if it returns the files you want:

C:>dir S:\Council\APPS\GENETICS\CURRENT\*.csv

I don't believe this is a comma-separated vs. a tab-separated problem --
unless the .csv file has been opened by an Excel program and then saved
as an Excel file instead of a Text file. Can u open the .csv file using
Notepad? Does it look OK?

Have you changed the import specification to use Tab as the field
separator?
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBRAS8XIechKqOuFEgEQKlYwCeNtuTwmCu0rr5Cn4w27EJUcqcX9AAoKzO
Wdv1D03wUl9siNsu1sB7BpFv
=u4VT
-----END PGP SIGNATURE-----

kathie via AccessMonster.com wrote:
Thanks for the response. Neither worked. The code was ok until the file
changed. The file changed (not the name) from a comma delimited to a tab
delimited. I tried even changing the extension to a *.txt and that did not
work. I have also changed the specifications in "Genetics Imports" and nodda.
.. :(

MGFoster wrote:

Hello,
I have to import monthly, files that were once *.csv but due to commas in
addresses, the interface program was changed to dump tab delimited. Now my
code is not finding the files in the folder? The code is below - can anyone
help? (The files still are named with the extension of *.csv)

<SNIP>

' the pathname of the folder that contains the files for import
strInputDir = "S:\Council\APPS\GENETICS\CURRENT\"

<SNIP>

strImportFile = Dir(strInputDir & "\*" & strFileExt)
Set db = CurrentDb

<SNIP>

The path name has 2 \ characters after the concatenation:

S:\Council\APPS\GENETICS\CURRENT\\*.csv

Change this:

strImportFile = Dir(strInputDir & "\*" & strFileExt)

to this:

strImportFile = Dir(strInputDir & "*" & strFileExt)

Or, change this:

strInputDir = "S:\Council\APPS\GENETICS\CURRENT\"

to this:

strInputDir = "S:\Council\APPS\GENETICS\CURRENT"



.



Relevant Pages

  • Re: How do I fix my explorer "Open With" option
    ... In Win Explorer I wanted to open a .CSV file in MS Word. ... programs" tab that I could choose from to open this file. ... Winword is not on the list so I choose browse. ...
    (microsoft.public.windowsxp.customize)
  • RE: windows update not listed in add/remove program
    ... additional program were installed .yahoo tool bar,broweser esrvice extension ... i later unistalled browser service extension fron add/remove program this ... caused the chang/remove button to dissapear office updates to dissapear in ... Click on General Tab and you will see a Button called ...
    (microsoft.public.windowsxp.general)
  • Re: about the error at Tools->Options of Excel
    ... I cannot view the "Caculation" Tab because it displays error: ... > Do you have a decimal number in the "maximum change" box? ... >> "Your entry cannot be used. ... >> removed Excel program and reinstalled Excel again, ...
    (microsoft.public.excel)
  • Re: import .adr files
    ... If it is actually a text CSV file - just rename the file using a CSV ... extension (you should be able to open it up using any text editor like ... Karl Timmermans - The Claxton Group ... How do I import this into Outlook 2002? ...
    (microsoft.public.outlook.contacts)
  • Requery Total on Parent
    ... I have a form that contains ten subforms on tab pages. ... I have an item extension ... tried forcing a requery using the on change event of the item extension and ...
    (microsoft.public.access.formscoding)