How to re-link excel files everytime? (1 Viewer)

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:09
Joined
Mar 22, 2009
Messages
784
I want the access database to show a FileOpen Dialog each and everytime an access database opened to relink and refresh the Excel Sheet to link.
 

GPGeorge

Grover Park George
Local time
Today, 04:39
Joined
Nov 25, 2004
Messages
1,867
You can open a form to support the appropriate function when the accdb is loaded. There are two ways to do that, one using the AutoExec macro, the other by designating that form as the start-up form for the accdb.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:39
Joined
Feb 28, 2001
Messages
27,186
This usually means you would have some kind of opening form or opening macro that calls a dialog to ask for that linkable file.


If you have a switchboard or dispatcher form that gets launched then call from that form's OnLoad event. If you were using a macro it would probably need to do a RunCode action to call a function because macro RunCode action doesn't call subs, only functions.
 

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:09
Joined
Mar 22, 2009
Messages
784
How to relink the files programmatically? Thats where the complexity lies...
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:39
Joined
Feb 28, 2001
Messages
27,186
Look at this article:

 

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:09
Joined
Mar 22, 2009
Messages
784
Is there a way to control the linked table manager programmatically?

I am looking for an easy option like "Relink on Database Open"
 

prabha_friend

Prabhakaran Karuppaih
Local time
Today, 17:09
Joined
Mar 22, 2009
Messages
784
I remember there was an option present in earlier versions...
 

ebs17

Well-known member
Local time
Today, 13:39
Joined
Feb 7, 2020
Messages
1,946
This allows you to import an Excel table, but also link it. Before linking, the existing link must be deleted.

How exactly does the new Excel table differ from the existing one?
If the name of the workbook and the name of the table are the same, you can simply overwrite the old workbook with the new workbook (=> same path), and the existing link will work without any further action.
 

Users who are viewing this thread

Top Bottom