Forum Discussion
Sharepoint list update is not working sometimes
- Feb 09, 2023
Hi,
Do I understand the situation in your application right?
1. You have a form with a linked Sharepoint list as recordsource.
2. From within this form with a button or sth you are trying to update several records of the same list with your DAO.Execute statement.
3. You get error 3218 and you think it occurs for the currently active record in the form.
If that's correct then I would
a) not do a Refreshlink for the list or Refresh on the form in every iteration of the loop where you do the Execute.
b) try if the updates work when you disconnect the form from the list while executing the update statement. Just as a hard test if the form is the culprite:
Me.Recordsource = ""
For i = 0 To UBound(arr_iID) - 1
CurrentDb.Execute "Update shp_tblName set Bestätigung_um = '" & Now & "' where ID = " & arr_iID(i), dbFailOnError
Next iMe.Recordsource = "shp_tblName"
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevConMe.Refresh
 
I have a feeling,, if the cursor is on some recordset then it gets locked, and let not update.
But i applied all the different ways but unfortunately not successfull.
Is there anyway to move the curso to some other recordset?
BR
Arslan
Hi,
Do I understand the situation in your application right?
1. You have a form with a linked Sharepoint list as recordsource.
2. From within this form with a button or sth you are trying to update several records of the same list with your DAO.Execute statement.
3. You get error 3218 and you think it occurs for the currently active record in the form.
If that's correct then I would
a) not do a Refreshlink for the list or Refresh on the form in every iteration of the loop where you do the Execute.
b) try if the updates work when you disconnect the form from the list while executing the update statement. Just as a hard test if the form is the culprite:
Me.Recordsource = ""
For i = 0 To UBound(arr_iID) - 1
  CurrentDb.Execute "Update shp_tblName set Bestätigung_um = '" & Now & "' where ID = " & arr_iID(i), dbFailOnError
Next i
Me.Recordsource = "shp_tblName"
Servus
Karl
****************
Access Bug Trackers
Access News
Access DevCon
Me.Refresh
- AAB_786Feb 10, 2023Copper ContributorHello Karl,
thank you very much, Now i tested with your code (Me.Recordsource = "") and still no problem, i hope that this solved my problem.
BR