Results 1 to 3 of 3
  1. #1
    hawkins is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    82

    Import dependent


    I have a few columns that I want to populate in a table called Yearly. I have the same columns in an excel file filled with the information and has a column of a list of names 1,2,3,.... which is the same as the list of names in Yearly but the names can be repeated in Yearly because of multiple records for each year for a given name. I was wondering how I could import the table information into the table when it is dependent on the year being 2010 and having the same name? I have never imported in access so you might need to be pretty specific with the answer. Thank you for the future help!

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Importing an excel sheet into Access is as simple as Ctrl+A, Ctrl+C, Ctrl+V. That will bring in the entire sheet. You can then query for
    SELECT excelTable.* INTO newTableName
    FROM excelTable INNER JOIN Yearly ON excelTable.nameField = Yearly.nameField
    WHERE Yearly.yearField = 2010

    I haven't verified the SQL but that's pretty much how it should work.

  3. #3
    hawkins is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jun 2011
    Posts
    82
    thanks for the help, I ended up screwing around with the QBE view and was able to figure it out. The code ended up being:
    UPDATE Yearly, Table1 SET Yearly.CalcGrwth = Table1.CalcGrwth, Yearly.PercGrwSummLast5 = [Table1].[PercGrwSummLast5]
    WHERE (([Yearly].[Name2ID]=[Table1].[Names3ID]) AND ((Yearly.YearRecorded)=Year(Date())));

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

Similar Threads

  1. Dependent option group problem
    By Remster in forum Programming
    Replies: 5
    Last Post: 10-22-2010, 10:23 AM
  2. CurrentUser dependent data in formular
    By Patience in forum Access
    Replies: 1
    Last Post: 05-11-2010, 12:26 PM
  3. 3 Related Dependent Tables
    By jbarrum in forum Access
    Replies: 0
    Last Post: 11-17-2009, 11:27 AM
  4. Dependent Combo Box
    By tigers in forum Forms
    Replies: 1
    Last Post: 06-16-2009, 12:46 PM
  5. Setting a field to be dependent on another
    By CushingMT in forum Forms
    Replies: 0
    Last Post: 11-19-2008, 11:51 AM

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