[AccessD] Importing multiple txt files

Janet Erbach jerbach at gmail.com
Wed Apr 1 14:02:21 CDT 2009


All you guys...

I haven't been on the forum for several years and I'm floored by the prompt
replies and the excellent suggestions.   Thank you very much!!

Janet

On Wed, Apr 1, 2009 at 12:25 PM, Drew Wutka <DWUTKA at marlow.com> wrote:

> Dim strTemp as String
> strTemp=Dir("C:\YourPath\*.txt")
> Do until strTemp=""
>        Debug.print strTemp
>        strTemp=Dir
> Loop
>
> Drew
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Janet Erbach
> Sent: Wednesday, April 01, 2009 12:12 PM
> To: accessd at databaseadvisors.com
> Subject: [AccessD] Importing multiple txt files
>
>  Hello!
>
> I would like to programmatically import one by one all the text files in
> a
> given directory - usually around 30 files.  I've used code that I copied
> from http://www.mvps.org/access/api/api0001.htm to allow the user to
> browse
> through windows directories and select a single file to process...but
> now I
> want to process ALL the files in a given directory, regardless of the
> number
> of files.  I assumed I would build an array with the names of all the
> files
> and then loop through that array in my code to import and process them
> one
> by one.
>
> Does anyone know of code I could utilize that would allow me to
> identifity
> the names of all the txt files in a selected directory?  I'm lost when
> it
> comes to interfacing Access with Windows in this way!
>
> Janet Erbach
> NaturalHealthyConcepts.com
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> The information contained in this transmission is intended only for the
> person or entity to which it is addressed and may contain II-VI Proprietary
> and/or II-VI Business Sensitive material. If you are not the intended
> recipient, please contact the sender immediately and destroy the material in
> its entirety, whether electronic or hard copy. You are notified that any
> review, retransmission, copying, disclosure, dissemination, or other use of,
> or taking of any action in reliance upon this information by persons or
> entities other than the intended recipient is prohibited.
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>



More information about the AccessD mailing list