title: Split a String in Microsoft Access SQL for use with a command parameter
body: <p>I am using Microsoft Access 2000, and need to pass in a parameter that is a comma-delimited string.  The comma-delimited string is for an IN clause of the where statement.  An example of this would be:</p>
  
  <pre><code>SELECT * FROM Table1 WHERE Field1 IN (@MyValues)
  </code></pre>
  
  <p>where @MyValues might be something like <code>1,2,3</code></p>
  
  <p>However, when I pass in <code>1,2,3</code> the Access parameter doesn't seem to accept the input.  Is there a good split string function in Access SQL that will solve this issue?  Or is there another way of tackling this problem?  </p>
  
  <p>For reference on what I am doing, I am trying to use parameterized SQL in .NET to get a result set.  </p>
  
  <p><strong>EDIT:</strong>
  Below is an example of some simplified .NET code that would call this query:</p>
  
  <pre><code>OleDbCommand cmd = new OleDbCommand("SELECT * FROM Table1 WHERE Field1 IN (@MyValues)");
  cmd.Parameters.Add("@MyValues","1,2,3");
  </code></pre>