Results 1 to 6 of 6
  1. #1
    cliff.clayman is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    55

    Post Linked table to an Excel file won't hold the connection if the Excel file is moved or renamed

    I'm not sure if this is the right place to ask this question, so please feel free to move it to the appropriate spot. I have an Access database that has a linked Excel file. I want to be able to make changes in the Excel file and then have them updated in the Access table. However, I have multiple users for the Excel file and they are apt to change the name of the file or move the file. When that happens, the data does not get updated in the Access database. Is there anyway to maintain the link if the Excel file is moved and/or renamed?

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Unfortunately, no. Moving or renaming an Excel file won't automatically update the link in an Access database. You would have to fix the manually in the Access database.

    I suppose you could always try to educate your users....... but that's a bit like trying to train a cat.

  3. #3
    cliff.clayman is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    55

    Lightbulb

    Quote Originally Posted by John_G View Post
    Unfortunately, no. Moving or renaming an Excel file won't automatically update the link in an Access database. You would have to fix the manually in the Access database.

    I suppose you could always try to educate your users....... but that's a bit like trying to train a cat.
    Is there a way with VBA to create a Submit button on the Excel file that will update the Access table no matter what the user may do to the file?

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Is there a way with VBA to create a Submit button on the Excel file that will update the Access table no matter what the user may do to the file?
    If the Access database links to the Excel file, then there is no Access table to update - that is how linking works. In Access, the linked spreadsheet looks like a table, and can be used like a table (not updated, though), but it isn't in the Access database file.

    If you are referring to using VBA in Excel to update the link information in the Access database, then that might be possible, but all you would get would be the latest value, which might or might not work in the database.

    If your users are apt to move or rename the Excel file, how likely are they to do something worse, like make their own copies?

  5. #5
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    Sound like you want Sharepoint. Where you can submit your data to a common location for it to be reviewed as a whole, and have that data in turn used in a database that pulls from sharepoint.

  6. #6
    cliff.clayman is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    55
    I was able to write some VBA to suffice for my needs. We do use Sharepoint, but apparently that is an issue for some reason unknown to me.

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

Similar Threads

  1. Updating a Linked Excel File via VBA
    By JoeM in forum Programming
    Replies: 7
    Last Post: 09-09-2015, 01:13 PM
  2. Replies: 5
    Last Post: 06-04-2013, 06:59 PM
  3. Replies: 5
    Last Post: 01-29-2013, 06:00 PM
  4. Replies: 1
    Last Post: 01-22-2013, 09:51 AM
  5. #Num, Linked Excel File
    By Rick West in forum Import/Export Data
    Replies: 5
    Last Post: 02-04-2010, 10:50 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