Queries--Last

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database with a sales table, tracking the customers and their purchases. I want to create a query that looks at the last date the customer purchased something. I take the Last of the SaleDate. This usually works, but sometimes it does not seem to recognize the last date. I don't know if it is the last function, or the way the date was entered. There are a couple of different ways the user can go about entering a sale into the system, but the tables seem to have all the correct information regardless of the way the sale was entered. I would appreciate any help on this.
Thank you in advance, Sarena
 
Last is kind of misleading.

Try Max instead. It will always return the maximum value in the date field
(i.e. the most recent date).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Sarena said:
I have a database with a sales table, tracking the customers and their
purchases. I want to create a query that looks at the last date the
customer purchased something. I take the Last of the SaleDate. This
usually works, but sometimes it does not seem to recognize the last date. I
don't know if it is the last function, or the way the date was entered.
There are a couple of different ways the user can go about entering a sale
into the system, but the tables seem to have all the correct information
regardless of the way the sale was entered. I would appreciate any help on
this.
 
Back
Top