G
Guest
Hello all,
Could you tell me where is the mistake? I got an error "Invalid Operation"
when I try to run it.
[Forms]![frmSupplierInvoice]![txtIDInvoice] is a string
[Forms]![frmSupplierInvoice]![PurchaseOrderID] is a Integer
[Forms]![frmSupplierInvoice]![SupplierID] is a Integer
I think that the mistake is on "As Expr1"
strSQL2 = "INSERT INTO tblSupplierInvoiceTransaction ( PurchaseOrderID,
ProductID, SupplierID, intCategoryID, intSupplierProductID, IDMoneda,
dblPrice, prcDiscount, intUnitsOrdered, txtIDInvoice ) SELECT
tblPurchaseOrderTransaction.PurchaseOrderID,
tblPurchaseOrderTransaction.ProductID,
tblPurchaseOrderTransaction.SupplierID,
tblPurchaseOrderTransaction.intCategoryID,
tblPurchaseOrderTransaction.intSupplierProductID,
tblPurchaseOrderTransaction.IDMoneda, tblPurchaseOrderTransaction.dblPrice,
tblPurchaseOrderTransaction.prcDiscount,
tblPurchaseOrderTransaction.intUnitsOrdered," & Chr$(34) &
[Forms]![frmSupplierInvoice]![txtIDInvoice] & Chr$(34) & " AS Expr1 FROM
tblPurchaseOrderTransaction WHERE
(((tblPurchaseOrderTransaction.PurchaseOrderID)=" &
[Forms]![frmSupplierInvoice]![PurchaseOrderID] & ") AND
((tblPurchaseOrderTransaction.SupplierID)=" &
[Forms]![frmSupplierInvoice]![SupplierID] & "))"
Thanks in advance
MS
Could you tell me where is the mistake? I got an error "Invalid Operation"
when I try to run it.
[Forms]![frmSupplierInvoice]![txtIDInvoice] is a string
[Forms]![frmSupplierInvoice]![PurchaseOrderID] is a Integer
[Forms]![frmSupplierInvoice]![SupplierID] is a Integer
I think that the mistake is on "As Expr1"
strSQL2 = "INSERT INTO tblSupplierInvoiceTransaction ( PurchaseOrderID,
ProductID, SupplierID, intCategoryID, intSupplierProductID, IDMoneda,
dblPrice, prcDiscount, intUnitsOrdered, txtIDInvoice ) SELECT
tblPurchaseOrderTransaction.PurchaseOrderID,
tblPurchaseOrderTransaction.ProductID,
tblPurchaseOrderTransaction.SupplierID,
tblPurchaseOrderTransaction.intCategoryID,
tblPurchaseOrderTransaction.intSupplierProductID,
tblPurchaseOrderTransaction.IDMoneda, tblPurchaseOrderTransaction.dblPrice,
tblPurchaseOrderTransaction.prcDiscount,
tblPurchaseOrderTransaction.intUnitsOrdered," & Chr$(34) &
[Forms]![frmSupplierInvoice]![txtIDInvoice] & Chr$(34) & " AS Expr1 FROM
tblPurchaseOrderTransaction WHERE
(((tblPurchaseOrderTransaction.PurchaseOrderID)=" &
[Forms]![frmSupplierInvoice]![PurchaseOrderID] & ") AND
((tblPurchaseOrderTransaction.SupplierID)=" &
[Forms]![frmSupplierInvoice]![SupplierID] & "))"
Thanks in advance
MS