title: Open MS Access subform to edit specific record
body: <p>I have an Access form "DailyItemsTracked" with a subform "ActivitiesSubform" in datasheet view. When I double click on a record in "ActivitiesSubform" it should be opening a form called "ActivityEntry" to edit the record.</p>
  
  <p>When I double click, I have the correct id of the record I want to edit. However, the new form consistently opens to add a new record rather than edit the existing record. (All existing records are filtered out). I have Googled the issue for more than an hour, but without a resolution.</p>
  
  <p>The name of the id field and the id control source on the popup form are both "id".</p>
  
  <p>Here is how I have tried to open the form:</p>
  
  <pre><code>MsgBox (Me![id]) 'It is getting the correct id for the selected record
  
  DoCmd.OpenForm "ActivityEntry", , , "ID=" &amp; Me.id
  
  DoCmd.OpenForm "ActivityEntry", , , "[id]=" &amp; Me![id]
  
  DoCmd.OpenForm "ActivityEntry", , , "[id]=" &amp; Form_ActivitiesSubform.id
  
  Dim stDocName As String
  Dim stLinkCriteria As String
  stDocName = "ActivityEntry"
  stLinkCriteria = "[id]=" &amp; Me![id]
  
  Dim stDocName As String
  Dim stLinkCriteria As String
  stDocName = "ActivityEntry"
  stLinkCriteria = "ActivityEntryEdit.[id]= " &amp; Me![id]
  </code></pre>
  
  <p>Even when I spell out the id explicitly it is still opening to a new record:</p>
  
  <pre><code>Dim stDocName As String
  Dim stLinkCriteria As String
  stDocName = "ActivityEntry"
  stLinkCriteria = "ActivityEntry.[id]= " &amp; 69
  </code></pre>
  
  <p>Nor can I select the record after opening</p>
  
  <pre><code>Dim stDocName As String
  Dim stLinkCriteria As String
  stDocName = "ActivityEntry"
  stLinkCriteria = "ActivityEntryEdit.[id]= " &amp; Me![id]
  DoCmd.OpenForm stDocName, , , stLinkCriteria
  Forms(stDocName).Recordset.FindFirst "id = " &amp; Me!id
  </code></pre>
  
  <p>I appreciate any help you can offer!</p>