title: If Statements VBA ACCESS 2010
body: <p>When using a</p>
  
  <pre><code>If Then
  'Do Something
  Else If
  'Do Something
  End If 
  </code></pre>
  
  <p>If the first and second condition is true would it execute just the first or both?</p>
  
  <p>for some reason when i have this code:</p>
  
  <pre><code>Dim Report As String
  
  If (DateRange_Pro_TotalCount &gt; 0) Then
  
          Dim DateRange_Pro_ReportStr As String
  
          DateRange_Pro_ReportStr = "Total Referrals: " &amp; DateRange_Pro_TotalCount &amp; vbNewLine _
  
          Report = Report &amp; DateRange_Pro_ReportStr
  
      ElseIf (DateRange_InPro_TotalCount &gt; 0) Then
  
          Dim DateRange_InPro_ReportStr As String
  
          DateRange_InPro_ReportStr = "Total Referrals: " &amp; DateRange_InPro_TotalCount &amp; vbNewLine _
  
          Report = Report &amp; DateRange_InPro_ReportStr
  
  End If
  
  'next statement prints report variable to textBox
  </code></pre>
  
  <p>This statement only executes the first condition even though both conditions are true. I changed 'Else If' to 'End If' and 'If' ( two diff. conditional statments instead of one statement with two conditions) and it worked. </p>