title: Issue with LINQ with a variable where clause
body: <p>First time posting a question so I apologize in advance if I make a mis-step.</p>
  
  <p>I have a widows form application that includes a list box for users to make one or multiple selections.  This feeds a LINQ query to return them the data they want.  When the user makes a singular selection the query works, but when multiple entries are selected the query returns 0 results.</p>
  
  <p>Here is the query:</p>
  
  <pre class="lang-vb prettyprint-override"><code>assets = From anitem In myTable
           Where String.Equals(cboStatus.SelectedItem.ToString,
               anitem.Field(Of String)("Status"),
               StringComparison.OrdinalIgnoreCase) _
           And Integer.Parse(anitem.Field(Of String)("Days Late")) &lt;= intDays _ 
           And Enumerable.Range(0, facilities.Count).All(Function(i) _
               anitem.Field(Of String)("Facility").Contains(facilities(i))) _
           Select anitem
           Order By Integer.Parse(anitem.Field(Of String)("Days Late")) Ascending
               Select Facility = anitem.Field(Of String)("Facility"), _
               Zone = anitem.Field(Of String)("Zone"), _
               Building = anitem.Field(Of String)("Building"), _
               Floor = anitem.Field(Of String)("Floor"), _
               DeviceName = anitem.Field(Of String)("Device_Name"), _
               FullName = anitem.Field(Of String)("Full Device Name"), _
               DaysLate = Integer.Parse(anitem.Field(Of String)("Days Late")), _
               Status = anitem.Field(Of String)("Status"), _
               UserName = anitem.Field(Of String)("Username"), _
               Assignment = anitem.Field(Of String)("Assignment"), _
               ResponsibleParty = anitem.Field(Of String)("ResponsiblePartyName")
  </code></pre>
  
  <p>I think the issue is in the "And Enumerable.Range..." part of the code.</p>
  
  <p>The 3 things that are being used as criteria are number of days, status, and location  I need to return all records that are over the number of days, at a given status, and at any of the selected locations.</p>
  
  <p>I think I am close, but I am missing something and I hope someone could please help.</p>