title: Syntax error in string in query expression 'ID = 4
body: <p>I am using Visual Basic 2010 express to control a Ms.Access 2007 database. I am struggling in adding a record to the database.</p>
  
  <p>I get the Syntax error in string in query expression 'ID = 4</p>
  
  <p>Here is my code :</p>
  
  <pre><code> If ComboBox1.Text = "" Or TxtJam.Text = "" Or TxtAudio.Text = "" Then
              MessageBox.Show("Data belum lengkap", "Error", MessageBoxButtons.OK, messageBoxIcon.Error)
          Else
  
              myqry = "UPDATE TblJadwal SET "
              myqry = myqry + " Hari = '" &amp; ComboBox1.Text &amp; "',"
              myqry = myqry + " Jam = '" &amp; TxtJam.Text &amp; "',"
              myqry = myqry + " Audio = '" &amp; TxtAudio.Text &amp; "'"
              myqry = myqry + "WHERE "
  
              myqry = myqry + "ID = " &amp; TxtID.Text &amp; "'"
              mycmd = New OleDbCommand(myqry, conn)
              mycmd.ExecuteNonQuery()
              Call Set1()
          End If
  </code></pre>
  
  <p>and my database</p>
  
  <pre><code>ID , autonumber
  Hari, text 
  Jadwal, text 
  Jam, Text 
  </code></pre>