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

how to group without sorting

Status
Not open for further replies.

gurtl79

Programmer
Jun 19, 2003
7
SI
I would like to have a report which has 3 groups. It is important not to sort the details within the groups. How can I do that? At the moment, the details are shown in the opposite way as entered into the database. I have no idea how to inverse that. Thanks a lot.
 
You can't group without sorting. You can, however, sort before your first grouping by switching off the header & footer for your sort column(s). The only other way to go about it would be to put your data into a temporary table with an additional 'sort order' column - that you can then sort on once your grouping has been done.
 
If you want to retain the same order the information was entered into the form, I recommend adding an auto number field to the table. You can add this to your query making it your first sort.
 
thanks, this is a very good advice. i have already thought about autonumbers and then i encountered another problem. this is, inserting records. sometimes i just forget to add some product somewhere between the package of products, which is a group, and then i just don't know what to do with the autonumber. is it maybe possible to add some looping syntax which will insert a record somewhere in the middle of other autonumbered records and of course re-autonumber them?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top