I have been using a form to track actions for my work. The form also handles attachments. All was fine but since IT transitioned my system to Windows 10 and at the same time office 13 then 2016. The attachment function does not work correctly. When adding an attachment to a new record it completes the VBA with no error's but saves the record to the previous record. Has something changed in later versions that I should be aware of. I am using a simple enough rotine to add files:-
Dim db As DAO.Database
Dim rsParent As DAO.Recordset2
Dim rsChild As DAO.Recordset2
Set db = CurrentDb
Set rsParent = Me.Recordset
rsParent.OpenRecordset
rsParent.Edit
Set rsChild = rsParent.Fields("Attachments").Value
rsChild.AddNew
rsChild.Fields("FileData").LoadFromFile FilePath
rsChild.Update
rsParent.Update