Programmatically refresh linked tables

V

Vyyk Drago

Hi

I have an access database with a linked table (this table
is an Excel spreadsheet that gets updated monthly -
c:\rankiings.xls).

When this spreadsheet is updated, I usually have to right-
click on this object in the database window and then use
the Linked Table Manager to update this table. Is there a
way to automate this with VBA. I have come accross the
RefreshLink method, but the help files are not very clear
on how to use this.

Any help will be greatly appreciated.

Thanks
Vyyk
 
M

Michel Walsh

HI,


CurrentDb.TableDefs("TableName").RefreshLink


That would refresh the table itself... now, if it is display somewhere, that
depends "how it is displayed". Under a form, I would try Me.Refresh, or
Me.Requery.



Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top