G
Guest
Hi
i have an existing append query called qryTempPurchaseOrder which appends
data from another query qryPurchaseOrders to a table TempPurchaseOrder. i
have added a criteria within qryTempPurchaseOrder to the field
PurchaseOrderID as follows:
=[forms]![purchaseorders]![purchaseorderid]
this works fine when running from within the append query, with the form
PurchaseOrders open in the background, but trying to run with VBA using the
following code brings up error "Too few parameters. expected 1":
Dim qdfAppend As DAO.QueryDef
Set qdfAppend = CurrentDb.QueryDefs("qryTempPurchaseOrder")
qdfAppend.Execute
what am i doing wrong and/or is there a better way to approach it?
thanks
i have an existing append query called qryTempPurchaseOrder which appends
data from another query qryPurchaseOrders to a table TempPurchaseOrder. i
have added a criteria within qryTempPurchaseOrder to the field
PurchaseOrderID as follows:
=[forms]![purchaseorders]![purchaseorderid]
this works fine when running from within the append query, with the form
PurchaseOrders open in the background, but trying to run with VBA using the
following code brings up error "Too few parameters. expected 1":
Dim qdfAppend As DAO.QueryDef
Set qdfAppend = CurrentDb.QueryDefs("qryTempPurchaseOrder")
qdfAppend.Execute
what am i doing wrong and/or is there a better way to approach it?
thanks