Hey all,

The situation is: I am using an Access front-end to update a table stored in SharePoint. I have to save the record first before updating it because it's using an Attachments field. After the initial save the user fills out a form that is linked to the sharepoint table and hits a "Save" button to log the changes.

The problem: Right after the initial save, because a new record has been created, SharePoint automatically updates an Assigned To field with the user's name. This isn't something I can change. So when the user hits the save button to save the data they've entered, it causes an error "This record has been changed by another user while you've been editing it". It gives the option to overwrite the changes but when I do that, I lose the Assigned To information that's auto populated by SharePoint"

Is there a way to get around this? Like a wait command until sharepoint updates that field? Below is the code I tried to use, for some reason it doesn't stay in the While loop, I put a break point at the second "DoCmd.RunCommand acCmdSaveRecord" and AssignedTo still = Null. Help?



Code:
DoCmd.RunCommand acCmdSaveRecord
        TempID = txtID.value
        AssignedTo = DLookup("[Assigned To]", "[Team Action Items]", "[ID] = " & TempID)
        While AssignedTo = Null
            DoCmd.RefreshRecord
            AssignedTo = DLookup("[Assigned To]", "[Team Action Items]", "[ID] = " & TempID)
        Wend
        
  DoCmd.RunCommand acCmdSaveRecord