Requery linked tables in code?

K

Keith B.

Hi everyone... I have Googled high and low on this and could not find an
answer: I have linked an Access 2003 table to a SharePoint 2003 (WSS) site
list (let's call it "tblMyList"), and on a button click in a non-bound form
I open a recordset on the table, iterate through it, and may update the rows
or do other operations based on the list/table content.

The problem is that as long as my processing form is open (the form is NOT
bound to the recordset or table), I cannot seem to get the linked table to
refresh and show updates in the recordset in Access when someone has edited
the list in SharePoint. The only way that the external table data is
refreshed is if I close the form and re-open it (not optimal!). I have
tried .Requery, closing the recordset, iterating through the db TableDefs
and executing .RefreshLink on it, etc etc.

What am I missing? Code below for reference... Thanks in advance,

Keith


' I am opening the bound table
Dim db As Database, rs as RecordSet
Set db = CurrentDb
Set rs = db.OpenRecordset("tblMyList") ' have tried dbOpenSnapshot and
dbDynaset
:
rs.Requery
Me.Refresh
 

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