please help me with this..please tell what is wrong here..here is my code;
vb Code:
  1. Private Sub cmdSave_Click()
  2. Dim db_file As String
  3. Dim statement As String
  4. Dim conn1 As ADODB.Connection
  5. Dim ctl As Control
  6. Dim sDateString As Date
  7.  
  8. ' Date Format
  9. 'sDateString = Format(DTCalendar.value, "mm/dd/yyyy")
  10.  
  11. ' Get the data.
  12. db_file = App.Path
  13. If Right$(db_file, 1) <> "\" Then db_file = db_file & "\"
  14. db_file = db_file & "DB.mdb"
  15.  
  16. ' Open a connection.
  17. Set conn1 = New ADODB.Connection
  18. conn1.ConnectionString = _
  19. "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  20. "Data Source=" & db_file & ";" & _
  21. "Persist Security Info=False"
  22. conn1.Open
  23.  
  24. ' Compose the INSERT statement.
  25. statement = "INSERT INTO tblDPSR " & _
  26. "(LineNo, Shift, Date, PreparedBy, ItemCodes, Weight, StartingNo, LastNo, Quantity, TotalHPE1) " & _
  27. " VALUES (" & _
  28. "'" & cmbLine.Text & "', " & _
  29. "'" & cmbShift.Text & "', " & _
  30. "'" & DTCalendar.value & "', " & _
  31. "'" & cmbPrepared.Text & "', " & _
  32. "'" & cmbIC1.Text & "', " & _
  33. "'" & txtWeight1.Text & "', " & _
  34. "'" & txtStarting1.Text & "', " & _
  35. "'" & txtLast1.Text & "', " & _
  36. "'" & txtQ1.Text & "', " & _
  37. "'" & txtTotalHPE1.Text & "'," & _
  38. ")"
  39.  
  40. ' Execute the statement.
  41. conn1.Execute statement, , adCmdText
  42. 'conn1.Execute ("INSERT INTO tblDPSR(Date) VALUES (" & "'" & DTCalendar.value & "#,)")
  43.  
  44. ' Close the connection.
  45. conn1.Close
  46.  
  47. ' Clear the TextBoxes.
  48. For Each ctl In Controls
  49. If TypeOf ctl Is TextBox Then
  50. ctl.Text = ""
  51. End If
  52. Next ctl
  53.  
  54. End Sub
But as i click my save button, this is the error message:
Syntax error in INTO statement
With that error, highlights the line: conn1.Execute statement, , adCmdText

What could be my error? Please help me