+ Reply to Thread
Results 1 to 7 of 7

New column in Excel append to Access table

  1. #1
    Registered User
    Join Date
    12-10-2014
    Location
    Indiana, US
    MS-Off Ver
    2010
    Posts
    7

    New column in Excel append to Access table

    Alright I'm pulling data from an excel spread sheet. Quality puts in percentages every week for measures we use. Basically every week they add a new column with the date in the top cell (A,B,C, etc) and the % posted below that I need. I know where the next week will be posted, I just need something to automatically grab this and append it to my access table.

    I didn't know if anyone knew a macro or some VBA that may be able to run through the Excel file and perhaps create a table on another sheet and only append new rows to the table that would then append to my Access table?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: New column in Excel append to Access table

    Where/how do you want to append the data?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    12-10-2014
    Location
    Indiana, US
    MS-Off Ver
    2010
    Posts
    7

    Re: New column in Excel append to Access table

    I want to append it to an access table. Three columns ... Department, Date, and FTC value (percentage). The data is already in Excel I just have to find a way to recognize when a new value is inserted in Excel. Worst case scenario I'm creating a Comp. Primary Key of Dept and Date so if it has a duplicate in access it won't add it.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: New column in Excel append to Access table

    Where does Department come from?

    Does the table already have a pk?

  5. #5
    Registered User
    Join Date
    12-10-2014
    Location
    Indiana, US
    MS-Off Ver
    2010
    Posts
    7

    Re: New column in Excel append to Access table

    Department is a FK from another table (in access).

    I'm creating a new table called FTC... the table will have the following columns:

    Date PK
    Dept PK (FK from another table)
    FTC

    I'm just tying to extract the information from Excel when a new date is inputted.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: New column in Excel append to Access table

    But how do you get the Dept PK for the FTC you are appending to the FTC table?

    PS Why not use an autonumber for the PK of the table?

  7. #7
    Registered User
    Join Date
    12-10-2014
    Location
    Indiana, US
    MS-Off Ver
    2010
    Posts
    7

    Re: New column in Excel append to Access table

    Its in the Department table. In excel there are the departments in there with their FTC values. I'm just wanting to automatically append those to the table if they are new.

    So for instance:
    Excel Sheet:

    Date ----- Dept ----- FTC
    05/1/15 ----- 6200 ----- 78%
    05/8/15 ----- 6200 ----- 80%
    05/15/15 ----- 6200 ----- 87% (Let's say this is the new record)

    I want to run a macro that recognizes that this record is new, then when it sees it appends it to a table in Access (the FTC table).

    I made the PK Dept and Date in Access because there can't be duplicate data for the Dept and Date (there is always one entry for the day). The original plan was to just append the whole table to Access every week and the PK's would only append new values and not duplicate (which wouldn't work with an auto number field).

    Hope that helps convey what I'm trying to do.
    Last edited by myles8908; 05-29-2015 at 11:38 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Update and Append Entire table in Access
    By Yoyo120 in forum Access Tables & Databases
    Replies: 7
    Last Post: 06-06-2014, 05:15 AM
  2. Access VBA or SQL to add all records from a table to another table (Append)
    By ewong in forum Access Programming / VBA / Macros
    Replies: 3
    Last Post: 09-14-2012, 06:49 PM
  3. Update & Append Access Table Using Excel Macro - ADO
    By erock24 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2010, 04:49 AM
  4. How do I Append excel data to a Access database table in a excel macro?
    By Pete in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:20 PM
  5. [SOLVED] How do I Append excel data to a Access database table in a excel macro?
    By Pete in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:17 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1