Results 1 to 5 of 5
  1. #1
    Matthieu is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2009
    Posts
    31

    Import 1 spreadsheet into two tables

    Is it possible to import 1 spreadsheet into two tables? I had to split a table into two- one has the call information such as phone number, date, time, sales agent, etc., the other has information about the call such as whether various legal requirements were met. The first table has the primary key as an autonumber and the second table has that as a foreign key w/ a lookup, so that's how they are joined. However, the data that was gathered is on two spreadsheets, that I can either leave separate or combine into one. I'm not sure how I can import this though, and I get a subscript out of range error trying to import the second spreadsheet into the second table. Eventually I will have it set up for a front end/back end type database so the data will go directly into my reporting database, but for now I need to import it. Any ideas on this?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I would import them into two different tables and then manipulate them with queries and VBA.

  3. #3
    Matthieu is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2009
    Posts
    31
    Ya, i've got tables, queries, Forms and Reports all set up. The data is from a database that exactly matches the one I'm trying to import the data into, but I have multiple agents collecting data, and so I want to import each of their data into one master database and do reporting off of that. I haven't had time to set up the front end/back end type database, so I'm looking to import their data into my database. (each employee/agent exports their two tables at the end of the day, into excel spreadsheets) I'm trying to import their data. When I tried importing one spreadsheet table at a time, it gave me a subscript out of range error. I was thinking maybe, because of the relationships, I have to import both table/spreadsheets at once. I'm probably making this far more confusing/complicated then it needs to be.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    You've managed to loose me. The spreadsheets sound like they should be imported into two different tables.

  5. #5
    MAF4Fam6's Avatar
    MAF4Fam6 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Fruit Heights, Utah USA
    Posts
    140
    Quote Originally Posted by Matthieu View Post
    The data is from a database that exactly matches the one I'm trying to import the data into, but I have multiple agents collecting data, and so I want to import each of their data into one master database and do reporting off of that.
    Sounds like you are running multiple copies of your database between you and your agents. If I am correct, and you are trying to import their tables' data into the SAME tables on your copy of the database, then the values in the AutoNumber field (Primary Key) in ALL copies of your database will eventually cause duplicate records (AutoNumber) between each other.

    As RG pointed out:

    Quote Originally Posted by RuralGuy
    The spreadsheets sound like they should be imported into two different tables.
    To add on top of that...you will need to import any additional spreadsheets into their own unique tables or else you will run into further problems with duplicating records.

    -RC

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 0
    Last Post: 04-29-2009, 04:27 PM
  2. Automate Excel Import to Access Related Tables
    By KramerJ in forum Programming
    Replies: 6
    Last Post: 04-04-2009, 04:24 PM
  3. import an excell spreadsheet in an access database
    By lmichaud in forum Import/Export Data
    Replies: 0
    Last Post: 11-03-2006, 08:29 AM
  4. Problems with Import Spreadsheet Wizard
    By Conan Kelly in forum Import/Export Data
    Replies: 1
    Last Post: 11-29-2005, 09:39 AM
  5. Unable to import or link tables through odbc in Access SP2
    By Dave Jenkins in forum Import/Export Data
    Replies: 3
    Last Post: 11-09-2005, 11:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums