Refresh all values in a linked table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for a simple way to refresh all of the values in a linked table.

If I put the cursur on the table and click the fields the values will change
but I would like this to happen automatically.
 
lss said:
I am looking for a simple way to refresh all of the values in a linked table.

If I put the cursur on the table and click the fields the values will change
but I would like this to happen automatically.

Will RepaintObject work?

Mike
 
--no go--

I have tried the two macros below...

Sub AllTables()

DoCmd.RepaintObject acTable, "T4"
DoCmd.RepaintObject acTable, "C5"

End Sub

Sub AllTables()

CurrentDb.TableDefs("T4").RefreshLink
CurrentDb.TableDefs("C4").RefreshLink

End Sub

Any other suggestions?
 
lss said:
I am looking for a simple way to refresh all of the values in a linked table.

If I put the cursur on the table and click the fields the values will change
but I would like this to happen automatically.

RefreshLink Method

Updates the connection information for a linked table (Microsoft Jet
workspaces only).

Syntax

tabledef.RefreshLink

The tabledef placeholder specifies the TableDef object representing the
linked table whose connection information you want to update.

Remarks

To change the connection information for a linked table, reset the
Connect property of the corresponding TableDef object and then use the
RefreshLink method to update the information. Using RefreshLink method
doesn't change the linked table's properties and Relation objects.

For this connection information to exist in all collections associated
with the TableDef object that represents the linked table, you must use
the Refresh method on each collection.
 
Yes!
I tried this previously and it works great but only for the one instance.
I would like to automate this process.

Do you know what functions control the Linked Table Manager?

Thx..so far, so good.
 
lss said:
Yes!
I tried this previously and it works great but only for the one instance.
I would like to automate this process.

Do you know what functions control the Linked Table Manager?

This page has a download that includes 2 databases, in one of them there
are 2 different methods of updating a linked table:

http://www.databasejournal.com/features/msaccess/article.php/3591276
http://www.databasejournal.com/img/2006/03/ManualTableRelinking.zip

Maybe one of them will be suitable to your needs,
Mike
 
Back
Top