Results 1 to 4 of 4
  1. #1
    AndrogynyRocks's Avatar
    AndrogynyRocks is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Location
    Orange County, CA
    Posts
    2

    Exclamation Import Partial Excel File into Database

    Hello everyone,



    I have created a database with approximately 30 columns, 1st column being a primary key. At the end of the database there are 5 columns. We will call them VWXYZ.

    One of my users wants to be able to update VWXYZ via importing an Excel document to the existing table. He does NOT want fields 1-25 updated. He is editing his Excel document to only include the primary key and then VWXYZ with the same exact column names. When he imports, it sets 2-25 to blank and updates VWXYZ to the updated information.

    How can he import an Excel document that only updates VWXYZ?

  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
    The import wizard does not update existing table data, it will create a new table or append records to table.

    If the Excel table structure is suitable, can set up a link to the worksheet then use the linked 'table' as data source to update Access table.

    Otherwise, will need VBA code.
    Last edited by June7; 04-13-2012 at 11:16 AM.
    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
    AndrogynyRocks's Avatar
    AndrogynyRocks is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2012
    Location
    Orange County, CA
    Posts
    2
    Ok, this user needs to import Excel data multiple times a day. What VBA code can be used? Can I get an example?

    Quote Originally Posted by June7 View Post
    The import wizard does not update existing table data, it will create a new table or append records to table.

    If the Excel table structure is suitable, can set up a link to the worksheet then use the linked 'table' as data source to update Access table.

    Otherwise, will need VBA codej.

  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
    Can't offer 'one size fits all' code. The code will be specific to your situtation. Here is one example http://forums.aspfree.com/microsoft-...le-413493.html

    Google: Access import Excel
    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 Excel file to Access
    By emmett in forum Import/Export Data
    Replies: 3
    Last Post: 04-06-2012, 05:27 AM
  2. create a button for import excel file
    By tggsun in forum Forms
    Replies: 3
    Last Post: 01-17-2012, 08:40 AM
  3. Browse for Excel File and Import
    By AKQTS in forum Programming
    Replies: 1
    Last Post: 07-12-2011, 07:33 AM
  4. Excel Import - File with row spaces
    By Jackfam58 in forum Import/Export Data
    Replies: 1
    Last Post: 04-13-2011, 07:35 PM
  5. Import Excel File Using Macro?
    By oregoncrete in forum Import/Export Data
    Replies: 0
    Last Post: 04-05-2011, 12:26 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