Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique summary info in Forms/Reports

Status
Not open for further replies.

WaltW

MIS
Jun 14, 2000
130
US
I have a query that gets info from a few fields in a single table.&nbsp;&nbsp;In one of the fields, data is repeated multiple times.&nbsp;&nbsp;For example, in 30 records I may have 12 records that contain one entry, another 9 records that contain another entry, etc.&nbsp;&nbsp;My challenge is to create a form and a report that provides in the Form or Page Footer:&nbsp;&nbsp;(1) a COUNT of how many different, unique entries there are in that field, and (2) a LIST of the unique entries.<br><br>Simple example:&nbsp;&nbsp;say the field FIELD4 contains the following data in 10 records - 220, 228, 228, 235, 220, 245, 228, 245, 220, 228.&nbsp;&nbsp;What I want to end up with in the footer is one field that simply contains the number 4 (since there are 4 unique entries), and a second field that contains something like &quot;220, 228, 235, 245&quot; (the list of unique entries in the field).&nbsp;&nbsp;How can I accomplish this?&nbsp;&nbsp;I'm using Access 97.&nbsp;&nbsp;Thanks!<br><br>Walt Wright
 
1.&nbsp;&nbsp;Create select query selecting FIELD4.<br>2.&nbsp;&nbsp;Click the summation sign to make it summary query.&nbsp;&nbsp;FIELD4 should show as group by.<br>4.&nbsp;&nbsp;If you just run the query it will show the values and the number of values as the number of records.<br>5.&nbsp;&nbsp;If you want to get fancy you can create a tabular form based on the query.&nbsp;&nbsp;For the number of items create a field in the form footer giving it's data source as<br>&nbsp;&nbsp;&nbsp;=Count(*)<br>
 
Thanks for the tip!&nbsp;&nbsp;This worked very nicely for my purposes.<br><br>Walt Wright
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top