Stupid ORDER BY doesn't work

caracena

New member
Local time
Today, 15:11
Joined
May 14, 2008
Messages
8
Hello all,

I have a problem here... and it's driving me CRAZY :mad:

I have the following query (the SELECT was trimmed down 'couse it's too big):
Code:
SELECT tblItems.ID, tblProformas.[PROFORMA INVOICE NUMBER], tblItems.PROFORMA
FROM (tblEmpresas INNER JOIN tblProformas ON tblEmpresas.ID=tblProformas.[SHIP TO]) INNER JOIN tblItems ON tblProformas.[PROFORMA INVOICE NUMBER]=tblItems.PROFORMA
WHERE ((([tblProformas]![PROFORMA INVOICE NUMBER])=[Formularios]![frmProformas]![PROFORMA INVOICE NUMBER]))
ORDER BY tblItems.ID;
Notice how I inserted the tbl.Items.ID in first place right after the SELECT statement to see it that made any change... with no luck. Still gives me the results inverted in the report. Tried changind it to DESC and that didn't work either :p

Any help with this will be very much appreciated!!!!!!!
 
You mention a report...Access reports have their own sorting and grouping options which override the recordsource sorting. Check to make sure you don't have an additional Sort on the report itself.
 
Hi DJkarl, thanks for your answer. The thing is that the report only prints recursively the results provided by a query... I've couldn't find any kind of "order" param in the report's properties.

BTW, this report is custom made... not from a wizard, so I don't know if I did something wrong O.o
 
With the report in design view, click on View/Sorting and Grouping.
 
Howzit

The sorting and grouping options mentioned by DJKarl is not part to the report properties as such, but an option on the Design Toolbar (next to the toolbar icon). I believe it is the order you specify that ther determines the order of the report.
 
Thanks... I found it. I saw it 100000000 times but I was focused on doing it thru the query :o

Thanks a lot guyz!!!
 
De nada, mi amigo. That's a large chunk of my Spanish. :p
 

Users who are viewing this thread

Back
Top Bottom