gmaxey
05-19-2013, 02:28 PM
Can anyone explain why I get an error in the following code:
Dim strSQL as String
On Error Resume Next
'Define the statement.
strSQL = "INSERT INTO tblNumSchemes VALUES ('Test', False, '0', '0', '0');"
'This errors. Why?
m_Conn.Execute strSQL
If Err.Number <> 0 Then Debug.Print Err.Number & " " & Err.Description
On Error GoTo 0
'When what appears to be the very same thing spelled out does work!
m_oConn.Execute "INSERT INTO tblNumSchemes VALUES ('Test', False, '0', '0', '0');"
It appears that I am missing something very simple, but I just can't determine what it is. Thanks.
Dim strSQL as String
On Error Resume Next
'Define the statement.
strSQL = "INSERT INTO tblNumSchemes VALUES ('Test', False, '0', '0', '0');"
'This errors. Why?
m_Conn.Execute strSQL
If Err.Number <> 0 Then Debug.Print Err.Number & " " & Err.Description
On Error GoTo 0
'When what appears to be the very same thing spelled out does work!
m_oConn.Execute "INSERT INTO tblNumSchemes VALUES ('Test', False, '0', '0', '0');"
It appears that I am missing something very simple, but I just can't determine what it is. Thanks.