Hello, I'm using MS Access 2000 with QODBC to link to Quickbooks.
I'm having trouble using an update statement that works fine with the BillItemLine table.
Here is the statement that works fine:
'********************************************************
'Now open a recordset to update the changed information sSQL = "SELECT * FROM BillItemLine " & _ "WHERE (((TxnNumber)=" & intTxnNumber & "))" OpenRS (sSQL) g_adoRS.MoveFirst g_adoRS.Fields("VendorRefListID") = strVendorRefListID g_adoRS.Fields("ItemLineDesc") = strItemLineDesc g_adoRS.Fields("RefNumber") = strInvoiceNum g_adoRS.Fields("TxnDate") = strTxnDate g_adoRS.Fields("ItemLineCost") = dblItemLineCost g_adoRS.Fields("Memo") = strMemo g_adoRS.Fields("ItemLineTaxCodeRefListID") = strItemLineTaxCodeRefListID g_adoRS.Update
'**********************************************************************
Yet when I fundamentally try to update the VendorCreditList table using the same method it errors out to error code -2147467259. Here is the code for that:
'**********************************************************************
'Now open a recordset to update the changed information sSQL = "SELECT * FROM VendorCreditItemLine " & _ "WHERE (((TxnNumber)=" & intTxnNumber & "))" OpenRS (sSQL) g_adoRS.MoveFirst g_adoRS.Fields("VendorRefListID") = strVendorRefListID g_adoRS.Fields("TxnDate") = strTxnDate g_adoRS.Fields("RefNumber") = strInvoiceNum g_adoRS.Fields("ItemLineDesc") = strItemLineDesc g_adoRS.Fields("Memo") = strMemo g_adoRS.Fields("ItemLineCost") = dblItemLineCost g_adoRS.Fields("ItemLineTaxCodeRefListID") = strItemLineTaxCodeRefListID g_adoRS.Update
'********************************************************************************************
I'd really appreciate any assistance you can provide, I've checked and double checked all the variables that are being passed and they look just fine. The recordset itself has the previous values. |