title: Add query to child form
body: <p>I have been looking for some time now, but I can't see the problem here: </p>
  
  <pre><code>Option Compare Database
  Option Explicit
  
  Private Sub cmd_Refresh_Click()
  
  Dim sSQL_Select                     As String
  Dim Qdb                             As Database
  Dim Qry                             As QueryDef    
  
  sSQL_Select = "SELECT * FROM T_TIME_SCHEDULE"
  
  Set Qdb = CurrentDb
  Set Qry = Qdb.CreateQueryDef("QTS", sSQL_Select)
  DoCmd.OpenQuery "QTS", acViewNormal
  Me.F_Child_Result.Form.RecordSource = "QTS"
  Me.F_Child_Result.Requery
  
  Qdb.QueryDefs.Delete ("QTS")
  Set Qdb = Nothing
  
  End Sub
  </code></pre>
  
  <p>This line: </p>
  
  <pre><code>Me.F_Child_Result.Form.RecordSource = "QTS"
  </code></pre>
  
  <p>results in the following error:<br>
  <strong>Run-Time error '2467': The expression you entered refers to an object that is closed or doesn't exist.</strong><br>
  The syntax should be correctly constructed, and I double checked the name of the subform.<br>
  Desipte, the error remains. </p>