K
Keith B.
Hi everyone... This is ia repost b/c I didn't get any answers to the
previous post... and I can't believe this isn't possible to do!!
I have Googled high and low on this and could not find an
answer: how do you use VBA in Access 2003 to requery the data in an
external linked table?
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 external linked 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
previous post... and I can't believe this isn't possible to do!!
I have Googled high and low on this and could not find an
answer: how do you use VBA in Access 2003 to requery the data in an
external linked table?
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 external linked 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