Question Access 07 Form using Sharepoint 07 lists - list data not refreshing

Mailliw

New member
Local time
Yesterday, 16:41
Joined
Jan 23, 2013
Messages
5
Hello,

I have a Form in Access 2007 that modifies records in a SharePoint List called 'Reservations'. There is a combo box in my form that displays all the reservation records in the list.

If I make a reservation on Computer1 auto-numbered ID 1 and then some time later make a reservation on Computer2 auto-numbered ID 2, the combo box on Computer2 will only show the record with ID 2. If I re-query the combo box on Computer1, it will only show the record with ID 1.

If from within Access on either computer I open the linked table (SharePoint list) 'Reservations', it contains both records. Now when I re-query the combo box, it shows both records.

I have the "Cache List Data" setting OFF. For some reason, SharePoint is using stale list data, but it still properly auto-numbers the IDs so it's not totally offline.

Any ideas?
Thanks!
 
I solved the problem by opening/closing the linked table with stale data. I guess it updates the local cache of the list data. On the down side, it adds a couple of seconds of delay.

Code:
Sub RefreshSharePointList(TableName As String)

Application.Echo False
Dim tbl As TableDef

For Each tbl In CurrentDb.TableDefs[INDENT]If tbl.Name = TableName Then     [INDENT]DoCmd.OpenTable tbl.Name
DoCmd.Close acTable, tbl.Name  
[/INDENT]End If 
[/INDENT]Next

Application.Echo True 

End Sub
Cheers
 

Users who are viewing this thread

Back
Top Bottom