I really need help with this; I am stuck. I have Access 97.
I have a table, "Orders," that shows orders made in 1998, 1999, 2000, and 2001. Some clients have ordered in all years, some haven't ordered for a years or so. I also have "Customer" and "Order details" tables.
I can run a query that shows orders for all years, and for specific years, but I am stuck as to how to run the following query.
I would like to run a query that will show the last order made by each client. It would go something like this:
If an order was made in 2001, then show that; If no order was made in 2001, then show 2000; if no order was made in 2000, then 1999; if no order was made in 1999, then 1998.
I don't know the proper syntax for this criteria. Can it even be done? Maybe with subqueries, or layered queries?
Is there something I need to put in a criteria box? Maybe under the "year ordered" column in the grid?
Any help will be greatly appreciated.
Thank you very much,
Marc
I have a table, "Orders," that shows orders made in 1998, 1999, 2000, and 2001. Some clients have ordered in all years, some haven't ordered for a years or so. I also have "Customer" and "Order details" tables.
I can run a query that shows orders for all years, and for specific years, but I am stuck as to how to run the following query.
I would like to run a query that will show the last order made by each client. It would go something like this:
If an order was made in 2001, then show that; If no order was made in 2001, then show 2000; if no order was made in 2000, then 1999; if no order was made in 1999, then 1998.
I don't know the proper syntax for this criteria. Can it even be done? Maybe with subqueries, or layered queries?
Is there something I need to put in a criteria box? Maybe under the "year ordered" column in the grid?
Any help will be greatly appreciated.
Thank you very much,
Marc