Question Field in SharePoint list mysteriously being set to null (1 Viewer)

Mr. B

"Doctor Access"
Local time
Yesterday, 22:04
Joined
May 20, 2009
Messages
1,932
I am using Access 2010 linked to a SharePoint 2010 list. This list has less than 1600 records.

I apologize in advance for posting such a long post. However, I do not know how to provide the information in a more concise way, so here goes:

I am developing a VBA module that is used to open a recordset of records from a linked table. This linked table is located in another Access database file located on a shared network drive. This recordset is developed by linking the two tables together with an equal join in an SQL statement so that only records in both tables will be in the recordset.

The VBA code is designed to iterate through a DAO recordset from the SQL statement updating a few of the fields in the SharePoint list. Both linked tables are linked correctly and are responsive. There is no issue with opening either of the tables.

The reason for iterating through the DAO recordset to update the SharePoint list is that there are criteria that must be evaluated for each record and values assigned for the update of each record.

The code is running without error, however, upon completion of running the code, and opening the SharePoint list, it was discovered that one field is being set to null. The field in question addressed and is not d\even found in any statement of any kind in the code.

I have tried many different things to determine what is causing the field in question to be set to null, but I have not been able to find any cause for this field to be set to null.

My explanation of what happens when the code is run will seem to be totally impossible, but please believe me when I say that I have been able to recreate this activity over and over again, without being able to come up with an explanation.

After many attempts to trace the value of the field and when it changes, I found that if I run the VBA code which has a nested IF statement for each month of the year where values in the DAO recordset are evaluated to assign value to update the field, when the first nested IF statement is completed for the first month, the value of this field is already set to null. However, if I define a string variable and just prior to the execution of the nested IF statement I assign the value of the field in question to that variable the field is not set to null. I do not have to re-assign the value to the field, it just retains its value. If I then execute the next nested IF statement, the value of the field is suddenly set to null. However, if I add the same assignment statement that assigns the value of the field to the variable just prior to each of nested IF statements, the code will run through all of the nested IF statements and the value of the field in question will not be set to null but will retain its value.

The curious thing about this whole thing is that if I define a string variable and at the start of the code within my For Loop and assign the value from the field in question to this string variable, my variable will hold the value from the field and then I can assign the value from my variable to the field just before the update of the DAO recordset. Using this method, I have been able to retain the appropriate value for each record and make my update process work as designed. However, this does not explain how or why the field that is not being mentioned in code is being changed to null.

If anyone has any thoughts or ideas or if you would like more information about this mysterious situation, I would be happy to share more details about my testing process and even my code.

I would just like to understand why this is happening with this linked SharePoint list. I have used linked table in Access for years and I have never seen any field get changed that was not specifically modified by the VBA code.

Thanks for taking the time to look at this and to read through this long explanation.
 

Mr. B

"Doctor Access"
Local time
Yesterday, 22:04
Joined
May 20, 2009
Messages
1,932
Just in case anyone else might need to know, as of yesterday afternoon I can now report a resolution to this very strange issue.

If you have read my initial post, you can easily tell that I was struggling to even try to understand how a totally unrelated and unaddressed, multi-line text field could suddenly have all data removed from the field.

I have continued to try to get a resolution to this issue since then end of last May when I initially posted my question. Fortunately for me, I am working on a contract at a international company that has options for assisting with the resolution of issues like this, especially where it involves the unexpected and uncontrolled loss of data.

As a part of my testing, I finally came to at least be able to recreate the issue from scratch which meant that we could validate that there was a serious loss of data that was occurring without explanation. I prepared the attached PDF document and had others here in the organization to use that document and they also were able to recreate the issue.

Well as it turned out, if you are using Access 2010 linked to SharePoint 2010 lists and you have at least one calculated type field in the SharePoint list and you have any multi-line text type fields defined in that list, you will experience the loss of the data from the multi-line text fields if you update more than one field at a time in that list. This is true no matter if you update the fields using an update query or you use VBA code to open a recordset, assign values to more that one field and then use the Update command on your recordset.

This issue was escalated to Microsoft and they were able to determine that this truly was a bug in Access 2010, but that there was a "Hotfix" for this issue that had been available since about the time that I discovered the problem. This "Hotfix" is related to replacing the "[FONT=&quot]Acewss.dll" file. I have always tried to acquire and apply any and all available updates when I am using any Microsoft products, especially Access. However, I was not aware of any "Hot Fix".

Here is a link to the Microsoft document that describes the issue. In the upper left corner of this document is a link to request and ultimately download the "Hotfix".

[/FONT][FONT=&quot]http://support.microsoft.com/default.aspx?scid=kb;EN-US;2552987[/FONT]
[FONT=&quot]
If you are using Access 2010 linked to SharePoint lists and are doing any updating of the SharePoint records from Access I would strongly suggest that you request and download this "Hotfix.
[/FONT]
 
Last edited:

vbaInet

AWF VIP
Local time
Today, 04:04
Joined
Jan 22, 2010
Messages
26,374
[FONT=&quot]
Here is a link to the Microsoft document that describes the issue. In the upper left corner of this document is a link to request and ultimately download the "Hotfix".
[/FONT]
You forgot the link Mr. B :)
 

Mr. B

"Doctor Access"
Local time
Yesterday, 22:04
Joined
May 20, 2009
Messages
1,932
Oops. Just proves that I am getting old and forgetful. :eek:

It is in the message now.

Thanks, vbaInet, for letting me know.
 

Users who are viewing this thread

Top Bottom