title: MS Access SQL query refreshes and loses values. if saved as query
body: <p>I have to use MS Access and got a running query, see end of question.</p>
  <p>My problem is as soon as I save my query in MS Access and open it again, one column only shows its values for a few seconds and then gets refreshed to empty cells.</p>
  <p>Is there any configuration or change on my query I can do, so it simply just shows the values without any strange/breaking refreshes?</p>
  <pre><code>SELECT  [Time Stamp]
          ,[Assay]
          ,[Project]
          ,[Direction]
          ,[Email]
          ,[Messung]
          ,[NextDirection]
          ,[Duration_ss]
  FROM (
      SELECT OT.[ID]
             ,OT.[Time Stamp]
             ,OT.[Assay]
             ,OT.[Project]
             ,OT.[Direction]
             ,OT.[Email]
             ,OT.[Messung]
             ,(
                  Select Top 1 Direction
                  FROM [tbl_HistoryLog] IT 
                  WHERE IT.Assay = OT.Assay and IT.Project = OT.Project 
                  ORDER BY IT.[Time Stamp] DESC
              ) AS NextDirection
              ,DATEDIFF(&quot;s&quot;,[Time Stamp],(
                          Select Top 1 [Time Stamp] 
                          FROM [tbl_HistoryLog] IT 
                          WHERE IT.Assay = OT.Assay 
                          and IT.Project = OT.Project 
                          and IT.ID &lt;&gt; OT.ID
                          ORDER BY IT.[Time Stamp] DESC)
              ) AS Duration_ss 
  
             FROM tbl_HistoryLog AS OT 
         )  AS RT
  WHERE ( [Direction] NOT LIKE 'CheckOut' and [Direction] &lt;&gt;[NextDirection]);
  </code></pre>
  <p><a href="https://i.stack.imgur.com/w8FiB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w8FiB.png" alt="enter image description here" /></a></p>
  <p>5 sec later ...</p>
  <p><a href="https://i.stack.imgur.com/AIoMR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AIoMR.png" alt="enter image description here" /></a></p>
  <p><strong>Edit</strong></p>
  <p>Raw Data:</p>
  <pre><code>ID  |Time Stamp             |Assay      |Project    |Direction  |Email  |Messung
  1   |11.01.2021 12:15:11    |text123    |project1   |CheckIn    |##     |#####
  2   |11.01.2021 12:16:12    |text123    |project2   |CheckIn    |##     |#####
  3   |11.01.2021 12:14:13    |text456    |project3   |CheckIn    |##     |#####
  4   |11.01.2021 12:56:47    |text456    |project3   |Checkout   |##     |#####
  </code></pre>
  <p>Result data:</p>
  <pre><code>ID  |Time Stamp             |Assay      |Project    |Direction  |Email  |Messung    |NextDirection  |Duration_ss
  3   |11.01.2021 12:14:13    |text456    |project3   |CheckIn    |##     |#####      |Checkout       |2554
  </code></pre>
  <p><code>NextDirection</code> loses values after few seconds. I guess the query tries to update, but does not fully run somehow...</p>