title: Multi-valued...cannot be used in a WHERE or HAVING
body: <p>I am not an access professional but use it to help me make my job easier so please excuse my terminology. I will try and explain as best I can.</p>
  
  <p>I need to create a data base that stores the contact and other information about vendors that we use and specifically the services and the countries that they can provide services in but some of these vendors can provide services in multiple countries and can also provide multiple services. So would prefer to be able to use a list with multi-valued entries for ease of use and to prevent having to duplicate the vendor entries for deferment countries and services. (This i can do)</p>
  
  <p>Then i need to create a search form that performs searches on key words, ether the country name, the service or the vendors name. I did this based on the following code i got from the internet:</p>
  
  <pre><code>Private Sub Command9_Click()
  
  Dim strsearch As String
  Dim strText As String
  strText = Me.TxtSearch.Value
  strsearch = "SELECT * from Query1 where ((Decipline Like ""*" &amp; strText &amp; "*"") or (Country_OO Like ""*" &amp; strText &amp; "*""))"
  Me.RecordSource = strsearch
  End Sub
  </code></pre>
  
  <p>(The search part in itself works fine)</p>
  
  <blockquote>
    <p>The problem: When I try to use the search with the multi-valued list
    box I get the following error: Error 3831 the multi-valued 'Country_OO'
    cannot be used in a WHERE or HAVING clause.</p>
  </blockquote>
  
  <p>Debug.Print strsearch SELECT * from Query1 where ((Decipline Like "a") or (Country_OO Like "a"))</p>
  
  <p>I know most of you on here are not fans of the <em>Multi-valued list</em> but in this case it would work great. Is there a way around this or and alternative that you can suggest? Maybe a way that i can select the from a list then it adds the txt only to the master file?</p>