stanl
03-19-2007, 09:02 AM
I am performing queries on a table and using CopyFromRecordset() to place results into an Excel template for analysis/printing. The data is historical, and for purposes of illustration assume it is grouped by City, Client, InvoiceDate.
I need the SELECT statement to Group by City,Client but within each client be have the InvoiceDate ordered
1/1/2004
1/1/2005
1/1/2006
2/1/2004..... rather than
1/1/2004
2/1/2004
3/1/2004........
I tried creating a non-displayed field Month(InvoiceDate) & Year(InvoiceDate) AS dSort, then using dSort as a Grouping but when run I am asked for a parameter for dSort. I should know this but :banghead: Stan
I need the SELECT statement to Group by City,Client but within each client be have the InvoiceDate ordered
1/1/2004
1/1/2005
1/1/2006
2/1/2004..... rather than
1/1/2004
2/1/2004
3/1/2004........
I tried creating a non-displayed field Month(InvoiceDate) & Year(InvoiceDate) AS dSort, then using dSort as a Grouping but when run I am asked for a parameter for dSort. I should know this but :banghead: Stan