title: Checkbox value in VBA yes/no
body: <p>I have a form where I have a combobox and 4 checkboxes. I want to insert value from combobox and from chechboxes, when it is checked it is true and when not it is false.</p>
  
  <p>When I put check on checkbox should insert value YES in database and when I don't put check it will be NO.</p>
  
  <pre><code>Private Sub Command12_Click()
  Dim strSQL As String
  Dim rst As New ADODB.Recordset
  Dim myval As String
  
  If Me.Check2 Or Me.Check6 Or Me.Check8 Or Me.Check10 = -1 Then
  myval = "Yes"
  Else
  myval = "No"
  
  strSQL = "INSERT INTO Declaratie (Код_предр, Декларация, Данные_фирмы,   
  Список_траспрота, Список_водителей) " &amp; _
           " VALUES ('" &amp; Me.НаимПредпр &amp; "','" &amp; Me.Check2 &amp; "','" &amp; Me.Check6 &amp; "','" 
  &amp; Me.Check8 &amp; "','" &amp; Me.Check10 &amp; "')"
  
  Call AttServ(strSQL, rst) 'выполнение запроса
  End If
  End Sub
  </code></pre>