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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping

Status
Not open for further replies.

pbrown2

Technical User
Jun 23, 2003
322
US
Is there anyway to group by a field but without designating Ascending or Descending Order? Basically the Ascendind/Descending order has been set now I need to keep details for records together. But when I put group by in the report I have to choose ascending or descending and I do not want either. Simply to have them grouped.

Thank you for any and all help,

PBrown
 
Yes, there is a way.
I often times create forms that have command buttons on them that launch specific reports, and those reports are based on query's.
If I want only records say in a given field that contain an "A", along with some numeric value: In the query, within the specific field, under Criteria I type in Like "A*"

Don
 
Lets try this again and this time, here is some detail that may help explain the situation.
This query runs off (2) tables: Paint & Paint Detail. Which forms have been made for: Paint Detail is a subform allowing multiple details for one Paint record.

Here is the query results and the order they actually appear:
The fields are: Record/Plant/Project/Code/Notes/Description/Y1/Y2/Y3/Y4
First line of Query results:
4 / Paint / Manuf / F / Spray / Nescessary / 72 / 75/ 31 /0
2nd line of results:
5 / Paint / Manuf / F / Costs / Nescessary / 18 / 18/ 9 / 0
3rd line
3 / Paint / Manuf / F / C1 / Nescessary / 3 / 0 / 0 / 0
4th line
3 / Paint / Manuf / F / C2 / Nescessary / 2 / 0 / 0 / 0
5th line
3 / Paint / Manuf / F / C3 / Nescessary / 1 / 0 / 0 / 0
6th line
3 / Paint / Manuf / F / C / Nescessary / 0 / 89 / 78 / 70
7th line
37 / Paint / Manuf / F / Proce / Nescessary / 0 / 0 / 0 / 18

The query is sorting the information as needed (Y1 Z-A then Y2 Z-A and so on. The problem is when the report runs.
The report needs to group all the same records together (in this one all the (3)'s should be grouped). However when making the report and putting record as a header, it ask for ascending or descending. Therefore, if Ascending is chosen, All record 3's appear as the top line when actually record 4 should be first as in the query. Is there anyway to make the report group by record# without having it sort it by record#?

Always...

Thank you for any and all help,

PBrown
 
Grouping and sorting are, I believe, intrinsically linked. What you might consider doing is creating sub-reports that each deliver the group you want to keep together. Easily done with a query that groups, but does not sort. Arrange the sub-reports on your main report to appear as if they are the result of a single report.

Lastly check your spelling.

AvGuy

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top