Results 1 to 4 of 4
  1. #1
    Yogibear is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2012
    Posts
    18

    Import from Excel to Access 2010 to add a column of data to a child table

    My alumni database contains two tables with a one-to-many relationship. One table is simple biographical information and the child table is a list of employment info. I am maintaining a history of employment for each of our alumni. An employee history ID is automatically generated.



    I need to add a column to the tblEmployment that indicates what career area that employment record indicates. I thought the best way was to export this data to an excel sheet (primary key, job title, employer name), add a column and put in the career area for each alum. My boss had to look at each record and determine what career area it was and he typed it in on the excel sheet. I thought I could easily import this back into the table.

    However I see one problem already.....that my excel sheet does not contain the employeehistory ID. So I cannot match up the records.

    But my main question is, I only want to import that career area column from the excel sheet into the child table. It would match up the records using the primary key (now realizing that that is problem wrong, it should be the employee history id). Can that be done???

    I hope I explained this correctly. Thank you in advance for your assistance.

    Susan

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What 'primary key' did you include on the spreadsheet? If it wasn't the history ID, I think you already answered your question, cannot match up the records.

    If the 'primary key' was actually the employee ID foreign key, then can apply the career type to all history records related to the employee.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Yogibear is offline Novice
    Windows Vista Access 2007
    Join Date
    Feb 2012
    Posts
    18
    Quote Originally Posted by June7 View Post
    What 'primary key' did you include on the spreadsheet? If it wasn't the history ID, I think you already answered your question, cannot match up the records.

    If the 'primary key' was actually the employee ID foreign key, then can apply the career type to all history records related to the employee.

    Thank you June 7 for confirming my hunch....i did not include the foreign key. I'd like to think I'm getting smarter (smarter, not smart!) with access because I did realize (albeit after the fact!) what might have gone wrong. Thank you again for helping me out I appreciate it since this forum is my only source of help.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I should have said 'cannot match up the records unless there is some combination of fields that can act as a unique identifier'. Good luck!
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Import from Excel to Access 2010 Issues
    By bcofie in forum Import/Export Data
    Replies: 7
    Last Post: 01-20-2014, 10:12 AM
  2. Import data from Excel to table on click
    By mrbabji in forum Import/Export Data
    Replies: 1
    Last Post: 04-19-2012, 05:15 PM
  3. import specific column from excel to access
    By eshtul in forum Import/Export Data
    Replies: 6
    Last Post: 11-11-2011, 09:54 AM
  4. Import Data from Excel into Access
    By sauce1979 in forum Import/Export Data
    Replies: 2
    Last Post: 10-14-2011, 12:05 AM
  5. Import to Excel from Access column of LOOKUP data type
    By Derek in forum Import/Export Data
    Replies: 1
    Last Post: 12-06-2010, 06:27 PM

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