View Full Version : Need help with query / report sorting


cuzzie
10-11-2010, 01:16 AM
Hi all,

I am a newbie in this website...

I need help in solving this matter that has bugging me for quite sometime.

I have a table which shown below:

Date | Invoice No | Customer Code
20/10/2010 | 12345 | 23456
21/10/2010 | 25478 | 23456
22/10/2010 | 29874 | 23456
23/10/2010 | 12345 | 23456
15/10/2010 | 22456 | 23456

My problem with this is that I try to sort this base on the date and try to group the invoice no together although the date is not the same shown below (highlighted in blue color):

Date | Invoice No | Customer Code
15/10/2010 | 22456 | 23456
20/10/2010 | 12345 | 23456
23/10/2010 | 12345 | 23456
21/10/2010 | 25478 | 23456
22/10/2010 | 29874 | 23456

Is this achievable?

Thank you very much for your help.

Trevor G
10-11-2010, 01:24 AM
Welcome to the Forum,

Have you considered grouping by the invoice field and then do a sort by date?

cuzzie
10-11-2010, 05:02 PM
Hi Trevor,

Thank you...

The method of grouping is done in the query or the report?

because I just try it in the report, seems that it is not working....

It still sort by dates but not keeping the invoice no together.....

Trevor G
10-12-2010, 01:25 AM
Would you be able to upload a sample of your database so I can take a look.

The grouping in the report should be able to do this for you rather than the query.

Are you aware that Microsoft provides sample database's for Forms, Querys and Reports which couold help you further.

The link to download the Report database is indicated here:

http://office.microsoft.com/en-us/access-help/sample-access-databases-that-you-can-download-and-adapt-HA001120138.aspx

vbaInet
10-12-2010, 01:46 AM
Remember that you should be sorting in ASCENDING order plus sorting in the query will have no effect on the report. You need to use the SORTING & GROUPING feature on the report.

Right click on your report in design view and you will see that menu. Click SORT to add a sort.

cuzzie
10-13-2010, 07:09 PM
Hi Trevor,

Sorry for the late reply.... I have attached the database with the sample data...

Inside the database there is 2 different customer id in which i need them to be sorted and grouped that i face the difficulties....

Thank you for your help once again.. :)

Trevor G
10-14-2010, 11:47 PM
Can you specify the field names to be sorted by.

cuzzie
10-17-2010, 04:30 PM
Hi Trevor,

The one that need to be group and sorted will be ARCSCD + ARCRCD (sort and group), ORIDATE (sort), and the last will be group by ORIINV. The active report is soa2Thank you very much for your help. I am also still trying with another method here.