showing only unique records

  • Follow


I have two databases linked, one keeps basic client information (name,
DOB, address, etc.), the other keeps track of client's visit date and
purchases. I want to display a list of clients that made purchases
within a given date range, regardless of number of purchases made.

 With the simple query view, somehow I end up displaying one row for
each client's purchase(s), i.e. if the client made 10 purchases in the
date range, then I see 10 entries displayed for such, when I only want
to see that client's name shown once. Is there a quick way to avoid
displaying the duplication?

0
Reply namsilat 1/18/2008 2:50:38 AM

If you are looking for the latest record use a "Totals" query (the Sigma 
button) and change Group By to Max in the date field.
-- 
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"namsilat" <talismana@hotmail.com> wrote in message 
news:5o40p3lo0cjl8777intau9pn5tn8s7t1hv@4ax.com...
>I have two databases linked, one keeps basic client information (name,
> DOB, address, etc.), the other keeps track of client's visit date and
> purchases. I want to display a list of clients that made purchases
> within a given date range, regardless of number of purchases made.
>
> With the simple query view, somehow I end up displaying one row for
> each client's purchase(s), i.e. if the client made 10 purchases in the
> date range, then I see 10 entries displayed for such, when I only want
> to see that client's name shown once. Is there a quick way to avoid
> displaying the duplication?
> 


0
Reply Arvin 1/18/2008 4:22:16 AM


Don't display the date field or any other non-unique information from the 
purchases table
- uncheck show field in the query grid
- enter your date criteria
Set the Unique Values property of the query to Yes
To do this:
--Right Click on the top section of the query (not on a table)
--Select View Properties from the menu

-- 
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"namsilat" <talismana@hotmail.com> wrote in message 
news:5o40p3lo0cjl8777intau9pn5tn8s7t1hv@4ax.com...
>I have two databases linked, one keeps basic client information (name,
> DOB, address, etc.), the other keeps track of client's visit date and
> purchases. I want to display a list of clients that made purchases
> within a given date range, regardless of number of purchases made.
>
> With the simple query view, somehow I end up displaying one row for
> each client's purchase(s), i.e. if the client made 10 purchases in the
> date range, then I see 10 entries displayed for such, when I only want
> to see that client's name shown once. Is there a quick way to avoid
> displaying the duplication?
> 


0
Reply John 1/18/2008 1:07:26 PM

2 Replies
552 Views

(page loaded in 0.474 seconds)


Reply: