title: doCmd.OpenReport where-condition syntax
body: <p>I have a very small Access database where I'd like to have a button, which opens up a report ("Mitarbeiterhonorare") filtered by a chosen value in the combination field "Kf-Referentenname". Unfortunately, my where-condition just doesn't seem to work (there has to be some formatting mistake, since it just opens up an empty report). Can anybody help me with the syntax there?</p>
  
  <p>Thanks a lot!</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub cmdOpenReport_Click()
      If IsNull(Me.Kf_Referentenname) Then
          Me.Kf_Referentenname.SetFocus
          MsgBox "Bitte einen Mitarbeiter auswählen!", vbExclamation
      Else
          DoCmd.OpenReport ReportName:="Mitarbeiterhonorare",      View:=acViewPreview, _
              WhereCondition:=Referent_Name = "&amp; Me.Kf_Referentenname"
      End If
  End Sub
  </code></pre>
  
  <p>The query the report is based on Looks like this: </p>
  
  <pre><code>SELECT Sum(Honorare.Betrag) AS Gesamtbetrag_Honorare, Mitarbeiter.Referent_Name FROM Mitarbeiter INNER JOIN Honorare ON Mitarbeiter.Mitarbeiter_ID = Honorare.Mitarbeiter_ID GROUP BY Honorare.Mitarbeiter_ID, Mitarbeiter.Referent_Name;
  </code></pre>