title: sending multiple parameters from form to report query
body: <p>Trying to send three variables (startDate, endDate, division) from a chooser form to a report query.  Sent the three variables through an doCommand.OpenReport command, then unpacked them in the Load event of the report.  I'm not sure what to assign them to in the report to use them in the query.  </p>
  
  <p>In the form:</p>
  
  <pre><code>Private Sub btn_bud_sum_exp_div_Click()
      Dim StrWhereCondition
      Dim a As String
      Dim b As String
      Dim c As String
  
      a = Me.txtStartDate.Value
      b = Me.txtEndDate.Value
      c = Me.lstDivision.Value
  
      StrWhereCondition = a &amp; "|" &amp; b &amp; "|" &amp; c
  
      'StrWhereCondition = "[accounting start date] = " &amp; Me.txtStartDate.Text
  
      DoCmd.OpenReport "FY15 Budget Line Sum - Expenditures - Div", , ,    StrWhereCondition
  End Sub
  </code></pre>
  
  <p>In the Load event of the report:</p>
  
  <pre><code>Private Sub Report_Load()
      Dim dtStartDate As Date
      Dim dtEndDate As Date
      Dim strDivision As String
  
      If Not IsNull(Me.OpenArgs) Then
          dtStartDate = parsetext(OpenArgs, 0)
          dtEndDate = parsetext(OpenArgs, 1)
          strDivision = parsetext(OpenArgs, 2)
      End If
  End Sub
  </code></pre>
  
  <p>In the report query:</p>
  
  <pre><code>SELECT 
      * 
  FROM 
      budget b
  WHERE 
      (b.start_date between dtStartDate AND dtEndDate) AND d.division = strDivision
  </code></pre>