I have 2 append queries, first a query appending the table orders into the table archiveorders and
second, appending the table order details into the table orderdetailsarchive.
Funny enough, the second query works if i run the query, but when i write a code then i receive the folowing error:
“circular reference caused by alias “order details” in query definition’s SELECT list.My code is as follows:
CurrentDb.Execute ” INSERT INTO orderdetailsarchive SELECT DISTINCTROW [order details] FROM orders INNER JOIN [order details] ON orders.orderid = [order details].OrderID WHERE (((orders.invoicedate)<#1/1/2001#))"
My table orders is related with the table order details with one to man y relationship.The table orderdetails archioev is a mirror table of order details. My aim is to cut off all the orders before 01.01.2001. My code works in the first case, the table orders,but fails with the second case, the table order details.I have given above my code for the second case, giving me the error.
Can somebody help me?