Automate Linked Table Manager?

jeffbruce

Registered User.
Local time
Today, 04:08
Joined
Jun 29, 2007
Messages
19
Ok. I've got a database and it has ONE linked table in Excel. Let's call it tblTable, for argument's sake. In order to proceed from the database start screen, the user must click a command button, which executes some VB code and opens up the main database window.

Now here's what I want to happen:
The user clicks the command button
Some code is executed to relink tblTable - tblTable will always be in the same directory as CurrentDb
So now the path specified for tblTable in linked table manager is CurrentProject.Path + "\tblTable.xls"
Main database window opens

Any help would be appreciated!
 
Why not put your code in the ON_load event of the form that opens initially.
 
Yeah I understand that, that's not really what I'm concerned about.

The issue is that I don't know how to edit the file name automatically using code. Oh, I suddenly have an idea: could I create a macro and code something in VB so that the macro is executed on every form load?
 

Users who are viewing this thread

Back
Top Bottom