title: Query based on Checkboxes
body: <p>I'm working on a program that will query a personal movie database.
  The wrinkle in the plan is selecting genres.
  For instance, let's say I have 3 checkboxes Action, Adventure and Comedy.
  A movie could fall into one genre or multiple genres.
  A movie could be an Action OR an Action/comedy.</p>
  
  <p>The code snippet below is what I started with...but does not accommodate all the variations.  The Fill_Grid function populates a dataGridView.  It works if the movie has one genre or if the user selects exactly the same genres that a movie has in the database.
  What needs to happen is if a movie is an Action Comedy it should show up if the user selects only Action or only comedy OR Action and Comedy.</p>
  
  <p>Please ask questions if this does not make sense.</p>
  
  <p>Thanks in advance,
  -J</p>
  
  <pre><code>       string str_SQL = "SELECT Name, File, Action, Fantasy, Horror, Thriller, Adventure, Animation, Comedy, Crime, Documentary, Drama, Family, Games, Mystery, Romance, SciFi, War FROM tbl_Main WHERE Action = " + chk_Action.Checked +
              " AND Fantasy = " + chk_Adv.Checked +
              " AND Horror = " + chk_Hor.Checked +
              " AND Thriller = " + chk_Thrill.Checked +
              " AND Adventure = " + chk_Adv.Checked +
              " AND Animation = " + chk_Anim.Checked +
              " AND Comedy = " + chk_Com.Checked +
              " AND Crime = " + chk_Crime.Checked +
              " AND Documentary = " + chk_Doc.Checked +
              " AND Drama = " + chk_Drama.Checked +
              " AND Family = " + chk_Fam.Checked +
              " AND Games = " + chk_Game.Checked +
              " AND Mystery = " + chk_Mys.Checked +
              " AND Romance = " + chk_Rom.Checked +
              " AND SciFi = " + chk_Sci.Checked +
              " AND War = " + chk_War.Checked + ";";
  
              Fill_Grid(str_SQL);
  </code></pre>