Results 1 to 4 of 4
  1. #1
    KelvClark is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    2

    Help updating database from spreadsheet

    Hi,

    I have a spreadsheet that has 1 column I would like to use to update one column in my database. I have a column on both the database and spreadsheet that would link them together. I’m wondering what the syntax would be to do this.

    Column 1 is the reference to link them together, but how do I go about overwriting Database column 2 with Spreadsheet Column2?

    What would the code be and where do I enter it?



    Database: Column1 = 1,2,3,4,5,6,7,8,9
    Column2 = xd,fr,hy,fd,er,ty,bg,nh,er

    Spreadsheet: Column1 = 1,2,3,4,5,6,7,8,9
    Column2 = aa,bb,cc,dd,ee,ff,gg,hh,ii

    Thanks in advance guys, I’m new to Access
    Last edited by KelvClark; 10-20-2015 at 11:47 AM.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I am confused. If column 1 in each dataset is the 'link', why would you want to update column 2 with value from column 1? Did you mean update table column 2 with spreadsheet column 2?
    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
    KelvClark is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Oct 2015
    Posts
    2
    Hi,

    Yeah sorry, I want to overwrite Database column 2 with Spreadsheet Column2.
    I probably should have mentioned that i intended the commas to represent separate rows in each column.
    Thanks

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Can you set a link to the spreadsheet?

    If so, build a query with query designer that joins the datasets then switch it to UPDATE query type. Under table column 2 on UPDATE TO row use criteria:

    spreadsheet!column2

    Use your actual object and field names.
    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. Replies: 3
    Last Post: 06-02-2015, 06:48 PM
  2. Replies: 5
    Last Post: 06-03-2013, 09:34 AM
  3. Replies: 1
    Last Post: 03-05-2012, 04:21 PM
  4. Replies: 5
    Last Post: 03-01-2012, 01:11 PM
  5. 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

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