Re: Importing Data-Multiple Sources

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ken Snell (kthsneisllis9_at_ncoomcastt.renaetl)
Date: 08/01/04

  • Next message: Larry Lofland: "Parameter Query"
    Date: Sat, 31 Jul 2004 23:26:37 -0400
    
    

    Two ways come to mind:

    (1) If all the files are in one folder, use Dir function to loop through the
    files and, on each loop, import a file to a table and then run an update
    query that writes the name of the file to the 7th field based on that field
    being "empty" (Null?).

    (2) Open each file via VBA file manipulation commands, and write each record
    from the file to a recordset that is based on the table, and include a 7th
    field in the writing process that contains the file name.

    Post back with more info about where/how your files are located, and we'll
    go from there.

    -- 
            Ken Snell
    <MS ACCESS MVP>
    <iam@notarealisp.com> wrote in message
    news:410c562c.25141171@news.qwest.net...
    > I want to import data from multiple sources.
    >
    > Each source has multiple entries with 6 fields in each entry.
    >
    > Is there an easy way during import to assign the souce to each entry
    > in a 7th field.
    >
    > field 1    First Name
    > field 2    Middle Name
    > field 3    Last Name
    > field 4    Birth Date
    > field 5    Death Date
    > field 6    Inscriptions
    > field 7    Source
    >
    > These are all comma delimited text files and I am trying to save
    > having to add the 7th field to all of the entries in each file
    > manually.  160 + files.  As many as 2000 entries per file.
    >
    > In other words, on each import, the name read as source would be
    > "plugged in" to field 7 only on those entries.
    >
    >
    

  • Next message: Larry Lofland: "Parameter Query"

    Relevant Pages

    • RE: Creating a que
      ... and entry count in a collection. ... if eo.Count> 0 then bMoreData = True ... At the beginning of the loop you assume this is the last time through the ... Then you go through each item in the Entries ...
      (microsoft.public.excel.programming)
    • RE: Creating a que
      ... and entry count in a collection. ... if eo.Count> 0 then bMoreData = True ... At the beginning of the loop you assume this is the last time through the ... Then you go through each item in the Entries ...
      (microsoft.public.excel.programming)
    • RE: Creating a que
      ... and entry count in a collection. ... if eo.Count> 0 then bMoreData = True ... At the beginning of the loop you assume this is the last time through the ... Then you go through each item in the Entries ...
      (microsoft.public.excel.programming)
    • Re: need help with images
      ... >>this will pull out all the entries of the current month and year that we ... >>how will the tblPics table pull out all the particular images for the blog ... >>entries as there will be more than one entry on the page, ... I assume you loop through the blog entries. ...
      (alt.php)
    • Importing Data-Multiple Sources
      ... I want to import data from multiple sources. ... Each source has multiple entries with 6 fields in each entry. ... field 6 Inscriptions ...
      (microsoft.public.access.tablesdbdesign)