Hiding OLD customers in list

D

Dave

I have a customer list (tblCustomers)
And an Orders table (tblOrders)
I want to have an admin area functionality that prunes (hides from display
in any list or report) Customers from the list that have not placed an order
in X number of days (Admin can enter the number of days in a text box)
Solution does not have to be in days or in a text box. Could be several
check boxes (30 days, 10 weeks, 2 years...).
I am just looking for the simplest solution for us to limit the Customer
list by last order date.

Any help here will be appreciated.

Thanks in advance
 
R

RBear3

If it were me, I would have a "Last Order Date" field in my customer table
and I would use code to fill it in when an order is added. Perhaps an
update query could do this for you by locating the most recent order for
each customer and placing the date in your table?

Then, In my forms, reports, and queries, I'd tell it to only pull customers
with a last order date newer than today minus XX days.

Note that you might be able to accomplish all of this without the need to
add a new date to your table. You could build the query I mentioned, then
pull the most recent order date, and use that to filter your list. I think
(but could be wrong) that this would probably take longer to read through
than simply maintaining a last order date in the customer table.
 
Top